osaf/services/saf/amf/amfd/sg_2n_fsm.cc |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


During SHUTDOWN operation on any SI without SI dependency, if some component 
rejects the quiescing callback
AMFD performs the failover of whole SU and SI remains in assigned state. But 
admin state of SI is LOCKED.
However, if SI dependency is configured then AMF deletes the assignments of the 
SI and keep it in LOCKED state.
With this patch, if fault occurs for quiescing callback during SHUTDOWN 
operation on SI, AMF will keep admin
state of SI UNLOCKED. Also SI will remain assigned. This fix is applicable to 
2N model only

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
@@ -1156,8 +1156,8 @@ static uint32_t avd_sg_2n_su_fault_si_op
                                avd_gen_su_ha_state_changed_ntf(avd_cb, l_susi);
                                avd_susi_update_assignment_counters(l_susi, 
AVSV_SUSI_ACT_MOD, SA_AMF_HA_QUIESCING, SA_AMF_HA_QUIESCED);
                                avd_susi_update(l_susi, l_susi->state);
-
-                               if 
(avd_sidep_si_dependency_exists_within_su(su)) {
+                               bool sidep_flag = 
avd_sidep_si_dependency_exists_within_su(su);
+                               if (sidep_flag) {
                                        if 
(avd_sg_susi_mod_snd_honouring_si_dependency(su, SA_AMF_HA_QUIESCED) == 
NCSCC_RC_FAILURE) {
                                                LOG_NO("%s:%u: %s ", __FILE__, 
__LINE__, su->name.value);
                                                goto done;
@@ -1169,7 +1169,10 @@ static uint32_t avd_sg_2n_su_fault_si_op
                                        }
                                }
 
-                               
avd_si_admin_state_set((su->sg_of_su->admin_si), SA_AMF_ADMIN_LOCKED);
+                               if (sidep_flag)
+                                       
avd_si_admin_state_set((su->sg_of_su->admin_si), SA_AMF_ADMIN_LOCKED);
+                               else
+                                       
avd_si_admin_state_set((su->sg_of_su->admin_si), SA_AMF_ADMIN_UNLOCKED);
                                m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su));
                                avd_sg_su_oper_list_add(cb, su, false);
                                m_AVD_SET_SG_FSM(cb, (su->sg_of_su), 
AVD_SG_FSM_SU_OPER);

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to