|
From: <pra...@or...> - 2015-03-27 13:35:22
|
osaf/services/saf/amf/amfnd/clc.cc | 18 ++++++++++--------
osaf/services/saf/amf/amfnd/su.cc | 8 +++++++-
2 files changed, 17 insertions(+), 9 deletions(-)
Quiesced is not sent, if comp fails in handling quiescing state during SU/Node
shutdown op.
Although it seems AMFD is not sending the quiesced state to AMFND,
problem is not at AMFD. When component faults, while handing quiescing assignment,
with comp-failover recovery, AMFND sends assignment response before submitting the
request for comp-failover. When AMFD gets success for quiescing state, despite
component-failover, it marks the SUSI assigned. Instead AMFND should submit comp-failover
request first then complete the assignments.
Patch ensures that in case a component faults with recovery comp-failover while
handling any assignment, first AMFND will send comp-failover request to AMFD then
it will complete the assignment process.
diff --git a/osaf/services/saf/amf/amfnd/clc.cc b/osaf/services/saf/amf/amfnd/clc.cc
--- a/osaf/services/saf/amf/amfnd/clc.cc
+++ b/osaf/services/saf/amf/amfnd/clc.cc
@@ -2098,6 +2098,16 @@ uint32_t avnd_comp_clc_terming_cleansucc
exit(0);
}
}
+ /*
+ Cleanup of failed component is over. If there is some pernding component-failover
+ report for AMFD, send it.
+ */
+ if (m_AVND_COMP_IS_FAILED(comp) && m_AVND_SU_IS_FAILED(su) &&
+ m_AVND_SU_IS_PREINSTANTIABLE(su) && (su->sufailover == false) &&
+ (avnd_cb->oper_state != SA_AMF_OPERATIONAL_DISABLED)) {
+ /* yes, request director to orchestrate component failover */
+ rc = avnd_di_oper_send(cb, su, SA_AMF_COMPONENT_FAILOVER);
+ }
/*
* su-sis may be in assigning/removing state. Except su-failover case,
@@ -2114,14 +2124,6 @@ uint32_t avnd_comp_clc_terming_cleansucc
m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, comp, AVND_CKPT_COMP_CONFIG);
}
- /* determine if this is a case of component failover */
- if (m_AVND_COMP_IS_FAILED(comp) && m_AVND_SU_IS_FAILED(su) &&
- m_AVND_SU_IS_PREINSTANTIABLE(su) && (su->sufailover == false) &&
- (avnd_cb->oper_state != SA_AMF_OPERATIONAL_DISABLED)) {
- /* yes, request director to orchestrate component failover */
- rc = avnd_di_oper_send(cb, su, SA_AMF_COMPONENT_FAILOVER);
- }
-
TRACE_LEAVE();
return rc;
}
diff --git a/osaf/services/saf/amf/amfnd/su.cc b/osaf/services/saf/amf/amfnd/su.cc
--- a/osaf/services/saf/amf/amfnd/su.cc
+++ b/osaf/services/saf/amf/amfnd/su.cc
@@ -416,8 +416,14 @@ uint32_t avnd_evt_avd_info_su_si_assign_
LOG_ER("susi_assign_evh: '%s' is not assigned to '%s'",
info->si_name.value, su->name.value);
} else {
- if (m_NCS_DBLIST_FIND_FIRST(&su->si_list) == NULL)
+ if (m_NCS_DBLIST_FIND_FIRST(&su->si_list) == NULL) {
LOG_ER("susi_assign_evh: '%s' has no assignments", su->name.value);
+ /* Some times AMFD sends redundant message for removal of assignments.
+ If removal of assignments is already done for the SU then complete
+ the assignment process here.
+ */
+ goto done;
+ }
}
}
|