Ack.

Thanks
Praveen
On 04-Apr-14 2:15 PM, nagendr...@oracle.com wrote:
>   osaf/services/saf/avsv/avd/avd_node.c   |  9 +++++++++
>   osaf/services/saf/avsv/avd/avd_su.c     |  8 ++++++++
>   osaf/services/saf/avsv/avnd/avnd_comp.c |  2 +-
>   3 files changed, 18 insertions(+), 1 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.
> Also, TRY_AGAIN need to be changed to BAD_OPERATIO because
> aplication can exit and not stay in loop in wrong path.
>
> Analysis: When su is not in appropriate state, allowing lock-in admin
> operation is making su states and CLC weird.
> Returning BAD_OP instead of TRY_AGAIN can make application exit.
>
> 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.
> Also, return BAD_OP instead of TRY_AGAIN.
>
> 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)) {
> diff --git a/osaf/services/saf/avsv/avnd/avnd_comp.c 
> b/osaf/services/saf/avsv/avnd/avnd_comp.c
> --- a/osaf/services/saf/avsv/avnd/avnd_comp.c
> +++ b/osaf/services/saf/avsv/avnd/avnd_comp.c
> @@ -508,7 +508,7 @@ proceed_next:
>       if (!m_AVND_COMP_TYPE_IS_PROXIED(*o_comp) &&
>           ((*o_comp)->pres != SA_AMF_PRESENCE_INSTANTIATING) &&
>           ((*o_comp)->pres != SA_AMF_PRESENCE_INSTANTIATED) && 
> ((*o_comp)->pres != SA_AMF_PRESENCE_RESTARTING)) {
> -             *o_amf_rc = SA_AIS_ERR_TRY_AGAIN;
> +             *o_amf_rc = SA_AIS_ERR_BAD_OPERATION;
>               return;
>       }
>   


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees_APR
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to