Hi Thuan,
ack with minor comment.
Thanks
Minh
On 3/6/19 5:10 pm, thuan.tran wrote:
COMP restart recovery during SU restart recovery can lead to SU
stuck in INSTANTIATING without further action. Because COMP instaniated
event in RESTARTING does not trigger avnd_su_pres_fsm_run().
---
src/amf/amfnd/clc.cc | 4 ++++
src/amf/amfnd/susm.cc | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/amf/amfnd/clc.cc b/src/amf/amfnd/clc.cc
index 675ca49..9b1b3a7 100644
--- a/src/amf/amfnd/clc.cc
+++ b/src/amf/amfnd/clc.cc
@@ -926,6 +926,7 @@ uint32_t avnd_comp_clc_st_chng_prc(AVND_CB *cb, AVND_COMP
*comp,
AVND_SU_PRES_FSM_EV ev = AVND_SU_PRES_FSM_EV_MAX;
AVND_COMP_CSI_REC *csi = 0;
bool is_en;
+ bool pi_comp_recover = false;
uint32_t rc = NCSCC_RC_SUCCESS;
TRACE_ENTER2("Comp '%s', Prv_state '%s', Final_state '%s'",
comp->name.c_str(), presence_state[prv_st],
@@ -953,6 +954,8 @@ uint32_t avnd_comp_clc_st_chng_prc(AVND_CB *cb, AVND_COMP
*comp,
TRACE_1(
"Component restart is through admin opration, admin oper flag reset");
comp->admin_oper = false;
+ } else if (m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(comp)) {
+ pi_comp_recover = true;
[M]: It looks doubtful, the check itself only wants to know if the @comp
is pi, it does not relate to the first *if* (@admin_oper and @final_st)?
}
if ((SA_AMF_PRESENCE_INSTANTIATED == prv_st) &&
@@ -1487,6 +1490,7 @@ uint32_t avnd_comp_clc_st_chng_prc(AVND_CB *cb, AVND_COMP
*comp,
(SA_AMF_PRESENCE_ORPHANED != prv_st) &&
((prv_st == SA_AMF_PRESENCE_INSTANTIATING) ||
(prv_st == SA_AMF_PRESENCE_TERMINATING) ||
+ (prv_st == SA_AMF_PRESENCE_RESTARTING && pi_comp_recover) ||
(comp->su->admin_op_Id == SA_AMF_ADMIN_RESTART)))
ev = AVND_SU_PRES_FSM_EV_COMP_INSTANTIATED;
else if (SA_AMF_PRESENCE_INSTANTIATION_FAILED == final_st)
diff --git a/src/amf/amfnd/susm.cc b/src/amf/amfnd/susm.cc
index c023c8d..62e2db9 100644
--- a/src/amf/amfnd/susm.cc
+++ b/src/amf/amfnd/susm.cc
@@ -2282,7 +2282,9 @@ uint32_t avnd_su_pres_insting_compinst_hdler(AVND_CB *cb,
AVND_SU *su,
curr_comp; curr_comp = m_AVND_COMP_FROM_SU_DLL_NODE_GET(
m_NCS_DBLIST_FIND_NEXT(&curr_comp->su_dll_node))) {
/* instantiate the pi comp */
- if (m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(curr_comp)) {
+ if (m_AVND_COMP_TYPE_IS_PREINSTANTIABLE(curr_comp) &&
+ (!m_AVND_COMP_IS_FAILED(curr_comp) ||
+ curr_comp->pres != SA_AMF_PRESENCE_RESTARTING)) {
TRACE("Running the component clc FSM");
rc = avnd_comp_clc_fsm_run(cb, curr_comp,
AVND_COMP_CLC_PRES_FSM_EV_INST);
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel