See inline
Thanks,
Hans
On 03/28/2014 02:14 PM, [email protected] wrote:
> osaf/services/saf/amf/amfd/sg_2n_fsm.cc | 23 +++++++++++++----------
> 1 files changed, 13 insertions(+), 10 deletions(-)
>
>
> Problem: During si-swap if quiesced assignment faults, AMF returns
> BAD_OPERATION even though si-swap completes successfuly after recovery.
>
> Reason: During si-swap, AMF sends quiesced assignment to active SU.
> During quiesced assignments, one of the components faults.
> AMF performs cleanup of this failed component and perfroms the failover of
> assignments to standby SU. For the faulted SU assignments are deleted and
> when it gets sucessfully repaired, AMF assigns it with standby assignments.
> Thus si-swap operation eventually gets successful, but AMF returns
> BAD_OPERATION for the operation.
>
> Fix: Since AMF performs si-swap successfuly despite fault in quiesced state,
> this patch ensures that AMF returns SA_AIS_OK for the operation.
>
> diff --git a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> --- a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> +++ b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> @@ -888,16 +888,6 @@ static uint32_t avd_sg_2n_su_fault_su_op
> if (su->sg_of_su->su_oper_list.su == su) {
> su_ha_state = avd_su_state_determine(su);
> if (su_ha_state == SA_AMF_HA_QUIESCED) {
> - if (su->su_switch == AVSV_SI_TOGGLE_SWITCH) {
> - AVD_SU_SI_REL *temp_susi;
> - for (temp_susi = su->list_of_susi; temp_susi !=
> NULL; temp_susi = temp_susi->su_next) {
> - if (temp_susi->si->invocation != 0) {
> -
> avd_saImmOiAdminOperationResult(cb->immOiHandle,
> -
> temp_susi->si->invocation, SA_AIS_ERR_BAD_OPERATION);
> - temp_susi->si->invocation = 0;
> - }
> - }
> - }
> m_AVD_SET_SU_SWITCH(cb, su, AVSV_SI_TOGGLE_STABLE);
> } else if (su_ha_state == SA_AMF_HA_QUIESCING) {
> if (avd_sidep_si_dependency_exists_within_su(su)) {
> @@ -2095,6 +2085,19 @@ static uint32_t avd_sg_2n_susi_sucss_su_
> }
>
> m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
> AVD_SG_FSM_SG_REALIGN);
> +
> + if (su->su_switch == AVSV_SI_TOGGLE_STABLE) {
I don't understand why the above if statement is there. I think it can be
removed. Neither is it explained with a code
comment.
The code below could need a comment like "complete (wrt IMM) possible SI admin
operations"
Add a TODO comment here since since it is adding duplicate code. In my patch
there was a complete_siswap() function that
you could add. But then all similar places needs to be changed.
> + for (AVD_SU_SI_REL *temp_susi =
> su->list_of_susi;
> + temp_susi != NULL;
> + temp_susi = temp_susi->su_next)
> {
> + if (temp_susi->si->invocation != 0) {
> +
> avd_saImmOiAdminOperationResult(cb->immOiHandle,
> +
> temp_susi->si->invocation, SA_AIS_OK);
> + temp_susi->si->invocation = 0;
> + }
> + }
> + }
> +
> }
> } else if ((act == AVSV_SUSI_ACT_MOD) && (state == SA_AMF_HA_STANDBY) &&
> (su->sg_of_su->su_oper_list.su == su)) {
>
>
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel