|
From: <pra...@or...> - 2015-09-17 13:36:42
|
osaf/services/saf/amf/amfd/su.cc | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
In the reported problem when component enters into TERM_FAILED state
during clean up failure, AMFD raises alarm and clears it immediately.
In the reported problem saAmfNodeFailfastOnTerminationFailure is set false.
When component enters term_failed state AMFD raises alrams on it.
When all components are cleaned up, amfnd sends a su-failover request to amfd.
As a part of sufailover request amfd marks all the comps uninstantiated and
clears any pending alrams on them. Since saAmfNodeFailfastOnTerminationFailure is false,
clearence of alarm should be done as a part of repair operation on SU.
Even in the case when saAmfNodeFailfastOnTerminationFailure=1, Alarm should be cleared
only when AMFD has detected that node has gone for reboot.
Patch fixes both the problems.
diff --git a/osaf/services/saf/amf/amfd/su.cc b/osaf/services/saf/amf/amfd/su.cc
--- a/osaf/services/saf/amf/amfd/su.cc
+++ b/osaf/services/saf/amf/amfd/su.cc
@@ -2103,7 +2103,19 @@ void AVD_SU::disable_comps(SaAisErrorT r
comp->curr_num_csi_actv = 0;
comp->curr_num_csi_stdby = 0;
avd_comp_oper_state_set(comp, SA_AMF_OPERATIONAL_DISABLED);
- avd_comp_pres_state_set(comp, SA_AMF_PRESENCE_UNINSTANTIATED);
+ if (comp->saAmfCompPresenceState != SA_AMF_PRESENCE_TERMINATION_FAILED)
+ avd_comp_pres_state_set(comp, SA_AMF_PRESENCE_UNINSTANTIATED);
+
+ /*
+ Mark a term_failed component uninstantiated when node is rebooted.
+ When node goes for reboot then AMFD marks node absent. If node does
+ not go for reboot then term_fail state of comp will be cleared
+ as part of admin repair operation.
+ */
+ if ((comp->saAmfCompPresenceState == SA_AMF_PRESENCE_TERMINATION_FAILED) &&
+ (su_on_node->node_state == AVD_AVND_STATE_ABSENT)) {
+ avd_comp_pres_state_set(comp, SA_AMF_PRESENCE_UNINSTANTIATED);
+ }
comp->saAmfCompRestartCount = 0;
comp_complete_admin_op(comp, result);
m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb, comp, AVSV_CKPT_AVD_COMP_CONFIG);
|