Hi Ack (review)
On 24/2/17, 11:32 am, "Minh Hon Chau" <[email protected]> wrote: src/amf/amfd/siass.cc | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) If loss of update saAmfSUAdminState before headless occurs, amfd currently does not have enough information to adjust saAmfSUAdminState. The reason is that amfd can not differentiate whether si-swap or su-lock has been executed before headless if saAmfSUAdminState was lost to update in IMM. Both si-swap and su-lock are using the same SG FSM STATE, having QUIESCED assignment. This patch prioritizes si-swap and ignore to update saAmfSUAdminState to LOCKED in order to avoid out of service. diff --git a/src/amf/amfd/siass.cc b/src/amf/amfd/siass.cc --- a/src/amf/amfd/siass.cc +++ b/src/amf/amfd/siass.cc @@ -378,9 +378,14 @@ bool avd_susi_validate_headless_cached_r present_susi->su->su_on_node->saAmfNodeAdminState != SA_AMF_ADMIN_LOCKED) { LOG_WA("SISU:'%s', ha:'%u', but one of [node/sg/su/si] is not in LOCKED", dn.c_str(), ha_fr_imm); - if (present_susi->su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SU_OPER) - present_susi->su->set_admin_state(SA_AMF_ADMIN_LOCKED); - else if (present_susi->su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) + if (present_susi->su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SU_OPER) { + // ambiguous between si-swap and su-lock both are + // using AVD_SG_FSM_SU_OPER. + // Prioritize si-swap, do not set saAmfSUAdminState + // to LOCKED to avoid out of service. + // TODO: Need a better solution to solve the ambiguity + TRACE("No adjustment for saAmfSUAdminState"); + } else if (present_susi->su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) present_susi->si->set_admin_state(SA_AMF_ADMIN_LOCKED); else if (present_susi->su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SG_ADMIN) present_susi->su->sg_of_su->set_admin_state(SA_AMF_ADMIN_LOCKED); ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
