osaf/services/saf/avsv/avd/avd_node.c | 9 +++++++++ osaf/services/saf/avsv/avd/avd_su.c | 8 ++++++++ 2 files changed, 17 insertions(+), 0 deletions(-)
Problem: When su is either in instantiating/Terminating/restarting state and if either su/node lock-in operation is performed, then it interrupt SU states and forces component to try again. Ideally this condition shouldn;t arise. Analysis: WHen su is not in appropriate state, allowing lock-in admin operation is making su states and CLC weird. Fix: Now, Amfd is returning try again for su/node lock-in admin command if su is in insting/terminating/restarting state. Once, SU reaches to insted/term failed/inst failed/uninstantiated, this command can be accepted. diff --git a/osaf/services/saf/avsv/avd/avd_node.c b/osaf/services/saf/avsv/avd/avd_node.c --- a/osaf/services/saf/avsv/avd/avd_node.c +++ b/osaf/services/saf/avsv/avd/avd_node.c @@ -1081,6 +1081,15 @@ static void node_admin_op_cb(SaImmOiHand LOG_WA("SU on this node is undergoing admin op (%s)", su->name.value); goto done; } + + if ((su->saAmfSUPresenceState == SA_AMF_PRESENCE_INSTANTIATING) || + (su->saAmfSUPresenceState == SA_AMF_PRESENCE_TERMINATING) || + (su->saAmfSUPresenceState == SA_AMF_PRESENCE_RESTARTING)) { + rc = SA_AIS_ERR_TRY_AGAIN; + LOG_WA("'%s' presence state is '%u'", su->name.value, su->saAmfSUPresenceState); + goto done; + } + if (su->sg_of_su->sg_fsm_state != AVD_SG_FSM_STABLE) { rc = SA_AIS_ERR_TRY_AGAIN; LOG_WA("SG of SU on this node not in STABLE state (%s)", su->name.value); diff --git a/osaf/services/saf/avsv/avd/avd_su.c b/osaf/services/saf/avsv/avd/avd_su.c --- a/osaf/services/saf/avsv/avd/avd_su.c +++ b/osaf/services/saf/avsv/avd/avd_su.c @@ -1057,6 +1057,14 @@ static void su_admin_op_cb(SaImmOiHandle goto done; } + if ((su->saAmfSUPresenceState == SA_AMF_PRESENCE_INSTANTIATING) || + (su->saAmfSUPresenceState == SA_AMF_PRESENCE_TERMINATING) || + (su->saAmfSUPresenceState == SA_AMF_PRESENCE_RESTARTING)) { + rc = SA_AIS_ERR_TRY_AGAIN; + LOG_WA("'%s' presence state is '%u'", su_name->value, su->saAmfSUPresenceState); + goto done; + } + if ((su->saAmfSUPresenceState == SA_AMF_PRESENCE_UNINSTANTIATED) || (su->saAmfSUPresenceState == SA_AMF_PRESENCE_INSTANTIATION_FAILED) || (su->saAmfSUPresenceState == SA_AMF_PRESENCE_TERMINATION_FAILED)) { ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel