Ack

Thanks
-Nagu

> -----Original Message-----
> From: Praveen Malviya
> Sent: 02 March 2015 19:05
> To: hans.nordeb...@ericsson.com; Nagendra Kumar;
> bertil.engelh...@ericsson.com; Mathivanan Naickan Palanivelu
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: [PATCH 3 of 7] amfd: modify assignments of NWay_Active SU during
> admin op on NG [#1235]
> 
>  osaf/services/saf/amf/amfd/include/sg.h      |   1 +
>  osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc |  43
> ++++++++++++++++++++++++++++
>  2 files changed, 44 insertions(+), 0 deletions(-)
> 
> 
> Handles modification of assignments in SU of NWay_Active SG because of lock
> or shutdown operation on Node group.
> If SU does not have any SIs assigned to it, AMF will try to instantiate new 
> SUs in
> the SG. If SU has assignments, then depending upon lock or shutdown
> operation, quiesced or quiescing state will be sent for the SU.
> 
> diff --git a/osaf/services/saf/amf/amfd/include/sg.h
> b/osaf/services/saf/amf/amfd/include/sg.h
> --- a/osaf/services/saf/amf/amfd/include/sg.h
> +++ b/osaf/services/saf/amf/amfd/include/sg.h
> @@ -506,6 +506,7 @@ public:
>               struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act,
> SaAmfHAStateT state);
>       uint32_t susi_failed(AVD_CL_CB *cb, AVD_SU *su,
>               struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act,
> SaAmfHAStateT state);
> +     void ng_admin(AVD_SU *su, AVD_AMF_NG *ng);
>  };
> 
>  /**
> diff --git a/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc
> b/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc
> --- a/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc
> +++ b/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc
> @@ -1938,6 +1938,49 @@ done:
> 
>       return;
>  }
> +/*
> + * @brief      Handles modification of assignments in SU of NWay_Active SG
> + *             because of lock or shutdown operation on Node group.
> + *             If SU does not have any SIs assigned to it, AMF will try
> + *             to instantiate new SUs in the SG. If SU has assignments,
> + *             then depending upon lock or shutdown operation, quiesced
> + *             or quiescing state will be sent for the SU.
> + *
> + * @param[in]  ptr to SU
> + * @param[in]  ptr to nodegroup AVD_AMF_NG.
> + */
> +void SG_NACV::ng_admin(AVD_SU *su, AVD_AMF_NG *ng) {
> +     TRACE_ENTER2("'%s', sg_fsm_state:%u",su->name.value,
> +                     su->sg_of_su->sg_fsm_state);
> +
> +     if (su->list_of_susi == NULL) {
> +             avd_sg_app_su_inst_func(avd_cb, su->sg_of_su);
> +             return;
> +     }
> +     SaAmfHAStateT ha_state;
> +     if (ng->saAmfNGAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
> +             ha_state = SA_AMF_HA_QUIESCING;
> +     else
> +             ha_state = SA_AMF_HA_QUIESCED;
> +
> +     //change the state for all assignments to quiescing/quiesced.
> +     if (avd_sg_su_si_mod_snd(avd_cb, su, ha_state) ==
> NCSCC_RC_FAILURE) {
> +             LOG_ER("quiescing state transtion failed for '%s'",su-
> >name.value);
> +             return ;
> +     }
> +
> +     avd_sg_su_oper_list_add(avd_cb, su, false);
> +     su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN);
> +     //Increment node counter for tracking status of ng operation.
> +     if (su->any_susi_fsm_in_modify() == true) {
> +             su->su_on_node->su_cnt_admin_oper++;
> +             TRACE("node:%s, su_cnt_admin_oper:%u", su->su_on_node-
> >name.value,
> +                             su->su_on_node->su_cnt_admin_oper);
> +     }
> +     TRACE_LEAVE();
> +     return;
> +}
> 
>  SG_NACV::~SG_NACV() {
>  }

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to