osaf/services/saf/amf/amfd/sg_2n_fsm.cc | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
Two si-swap operations are performed. Si-swap fails second time if fault
occurs during standby assignment and it leads to node-failover escalation
during first si-wap
Second si-swap fails because SG remain unstable. This particular case
is not handle in SG FSM of 2N model.
Patch fixes the problem by making SG stable.
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
@@ -59,7 +59,7 @@ static void complete_siswap(AVD_SU *su,
/* si->invocation field is not check pointed. If controller
failovers when si-swap
operation is in progress, si->invocation will be zero on the
new active controller.
Log an error when si-swap operation completes.*/
- LOG_ER("Operation done, but invocationId for the operation on
SI not found '%s'", su->name.value);
+ TRACE("Operation done, but invocationId for the operation on SI
not found '%s'", su->name.value);
}
TRACE_LEAVE();
}
@@ -2929,16 +2929,28 @@ static void avd_sg_2n_node_fail_su_oper(
/* the admin state of the SU is shutdown change it to
lock. */
if (su->saAmfSUAdminState ==
SA_AMF_ADMIN_SHUTTING_DOWN) {
su->set_admin_state(SA_AMF_ADMIN_LOCKED);
+ avd_sg_su_oper_list_add(cb, a_susi->su, false);
+ m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
AVD_SG_FSM_SG_REALIGN);
} else if (su_node_ptr->saAmfNodeAdminState ==
SA_AMF_ADMIN_SHUTTING_DOWN) {
m_AVD_IS_NODE_LOCK((su_node_ptr), flag);
if (flag == true) {
node_admin_state_set(su_node_ptr,
SA_AMF_ADMIN_LOCKED);
}
- } else {
- su->set_su_switch(AVSV_SI_TOGGLE_STABLE);
+ avd_sg_su_oper_list_add(cb, a_susi->su, false);
+ m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
AVD_SG_FSM_SG_REALIGN);
+ } else {
+
+ /* During si-swap while standby assignment is
going on, if Nodefailover
+ or SU failover got escalated then toggle SU
switch state and make SG
+ stable. After SG becomes stable, spare SU
will be instantiated,
+ if available, or same SU will get standby
assignment after repair.
+ */
+ if (su->su_switch == AVSV_SI_TOGGLE_SWITCH) {
+
su->set_su_switch(AVSV_SI_TOGGLE_STABLE);
+ m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
AVD_SG_FSM_STABLE);
+ complete_siswap(a_susi->su, SA_AIS_OK);
+ }
}
- avd_sg_su_oper_list_add(cb, a_susi->su, false);
- m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
AVD_SG_FSM_SG_REALIGN);
} /* if (a_susi->su != su) */
else {
if (s_susi != AVD_SU_SI_REL_NULL) {
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel