Hi Nagu,
Thanks for your testing.
Below is our investigation from TC1 - TC31 which seem to be important,
plus some patches that we're trying to fix the issues
1. IMM one payload limitation (TC #1, #6, #7, #8, #9, #10, #11)
Discussion is on-going. When we hit the limitation, which causes
mismatch of objects in amfd/imm vs amfnd:
- amfd's trying to tolerate the mismatch or the worst case that amfd
orders node reboot to the last payload in cluster to avoid amfd cyclic crash
2. Suspicious setting SU oper state in amfnd (TC #13, #24)
According the trace in TC24, after unlock-in nodegroup, amfnd change SU
oper state to DISABLED, which is wrong since no fault happens on SU.
We can raise ticket on non-headless code base. Though we think the patch
1620_amfnd_dont_disabled_healthy_su.diff can fix TC #24 for now
TC#13 has similar problem, but provided trace is only for amfd, so we
don't know where amfnd changed SU oper state to DISABLED. And we haven't
been able to reproduce this problem in TC#13 so far
3. Problem in TC #16
It seems the fault lies in the base code when the system is not
headless. The admin state should not stay in unlocked state. We can
raise a ticket on the current non-headless code later.
4. Amfnd coredump at "di.cc:850: avnd_di_susi_resp_send" (TC #18, #22, #26)
Have patch for this, please apply fix.patch
5. Amfnd crashes at "avnd_comp_cmplete_all_assignment" (TC #14, #17,
#19, #20, #21)
Have patch for this, please apply fix.patch
6. Support Nodegroup handling in delayed failover (TC #23)
At the time we developed AMF cloud resilience, we haven't had nodegroup
pushed. So we missed it.
Please apply the patch 1620_amfd_adjust_interm_admin_state.diff
7. Problem in TC #25
We think it's not really a fault. Please see our opinion at the end of email
8. Delayed failover needs to check csi level (TC #27)
Fault reproducible, however it seems a rare use case where user creates
extra csi just before decides to go headless. Fix is on going
9. Recover non existed csi (TC #28)
CSI had been deleted in IMM, but there's delay at application so its
assignment object is still in amfnd at the time recovery. The patch just
ignores to re-create this non-existed csi, please apply
1620_amfd_ignore_nonexisted_csi.diff
10. Delayed si dep issue (TC #29, #30)
Have patch for this, please apply
1620_amfd_add_su_op_list_delayed_sidep.diff
11. About TC #31, test case has fault ?
The trace shows A sponsor C, the test lock B and expect C is removed
Line 15815: Feb 12 20:00:25.403574 osafamfd [7989:imm.cc:0837] TR
safDepend=safSi=A\,safApp=Test\,safSi=C,safApp=Test(51)
Test cases are unable to reproduce: TC #2, #12, #13, #14 (#13, #14
should be fixed by attached patches)
The tests reported on TC #32 to TC #40 on Npm, Nway, that we haven't
planned to support it since haven't seen headless user using those
model, so they should be buggy. We added this limitation to README, or
it should be an enhancement in future.
So we're still working on some remaining TCs (#2, #3, #4, #15, #27, #41,
#42), alarm/notification related issues, and testing the patches.
If you find any other problems (or if you are not too busy to help
reproduce TC#2, #12, #13, #14), the traces are much helpful though it
would be nicer that we can have your testing model? (so we can quickly
know which attr is on/off)
Thanks,
Minh
Opinion on TC#25
------------------------
TC25:
- At the time SC1 restarts, amfd adjusts the assignment. amfd decides to
remove QUIESCED assignment of safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1,
because the gdb still hangs the
quiesced csi_set_callback
Feb 11 19:46:23.329326 osafamfd [28309:sgproc.cc:2328] >>
avd_sg_su_si_del_snd: 'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1'
- amfnd-PL3 receives su_si_del msg, buffer it
Feb 11 19:46:23.574645 osafamfnd [16881:su.cc:0376] >>
avnd_evt_avd_info_su_si_assign_evh:
'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1'
Feb 11 19:46:23.574657 osafamfnd [16881:susm.cc:0189] >>
avnd_su_siq_rec_buf: 'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1'
Feb 11 19:46:23.574667 osafamfnd [16881:sidb.cc:0937] >>
avnd_su_siq_rec_add: 'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1'
- the gdb releases csi_set_callback, the quiesced assignment sequence
continues, it's finished and report to amfd
Feb 11 19:46:27.327908 osafamfnd [16881:di.cc:0816] >>
avnd_di_susi_resp_send: Sending Resp
su=safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1,
si=safSi=AmfDemo,safApp=AmfDemo1, curr_state=3, prv_state=1
Then amfnd pulls out the su_si_del which is buffered and continue the
removal assignment sequence. This sequence finishes and amfnd report to amfd
Feb 11 19:46:27.329483 osafamfnd [16881:di.cc:0857] TR Sending.
msg_id'3', node_id'131855', msg_act'4',
su'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1', si'', ha_state'3',
error'1', single_csi'0'
- At amfd, upon receiving the report of quiesced assignment completion,
amfd decides to remove
quiesced assignment of SU1
Feb 11 19:46:27.086796 osafamfd [28309:sgproc.cc:2328] >>
avd_sg_su_si_del_snd: 'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1'
- So amfnd on PL3 receives another extra su_si_del msg, logs error
Feb 11 19:46:27.330333 osafamfnd [16881:su.cc:0376] >>
avnd_evt_avd_info_su_si_assign_evh:
'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1'
Feb 11 19:46:27.330359 osafamfnd [16881:su.cc:0425] ER susi_assign_evh:
'safSu=SU1,safSg=AmfDemo,safApp=AmfDemo1' has no assignments
Feb 11 19:46:27.330369 osafamfnd [16881:su.cc:0447] <<
avnd_evt_avd_info_su_si_assign_evh: 1
This is not a real problem, we think we can change it as warning
The improvement could be at amfnd side for non-headless code base, so
that it can flexibly handle unexpected extra su_si event. #1386 has
found this kind of limitation of amfnd where it could not handle another
su si event as it expected, it's due to multiple failures happening
along with admin command.
diff --git a/osaf/services/saf/amf/amfd/cluster.cc b/osaf/services/saf/amf/amfd/cluster.cc
--- a/osaf/services/saf/amf/amfd/cluster.cc
+++ b/osaf/services/saf/amf/amfd/cluster.cc
@@ -114,7 +114,7 @@ void avd_cluster_tmr_init_evh(AVD_CL_CB
*
*/
if (cb->scs_absence_max_duration > 0) {
- adjust_delayed_sidep();
+ adjust_delayed_sidep(cb);
}
if (cb->scs_absence_max_duration > 0) {
diff --git a/osaf/services/saf/amf/amfd/include/sg.h b/osaf/services/saf/amf/amfd/include/sg.h
--- a/osaf/services/saf/amf/amfd/include/sg.h
+++ b/osaf/services/saf/amf/amfd/include/sg.h
@@ -606,6 +606,6 @@ extern void avd_sg_adjust_config(AVD_SG
extern uint32_t sg_instantiated_su_count(const AVD_SG *sg);
extern bool sg_stable_after_lock_in_or_unlock_in(AVD_SG *sg);
extern void process_su_si_response_for_ng(AVD_SU *su, SaAisErrorT res);
-extern void adjust_delayed_sidep(void);
+extern void adjust_delayed_sidep(AVD_CL_CB *cb);
#endif
diff --git a/osaf/services/saf/amf/amfd/sg.cc b/osaf/services/saf/amf/amfd/sg.cc
--- a/osaf/services/saf/amf/amfd/sg.cc
+++ b/osaf/services/saf/amf/amfd/sg.cc
@@ -2008,7 +2008,7 @@ done:
* @param None
* @Return None
*/
-void adjust_delayed_sidep(void)
+void adjust_delayed_sidep(AVD_CL_CB *cb)
{
AVD_SU_SI_REL *curr_susi;
bool rescan = true;
@@ -2043,6 +2043,8 @@ void adjust_delayed_sidep(void)
curr_susi->si->name.value, curr_susi->su->name.value,
spsi_node->si->name.value);
avd_susi_del_send(curr_susi);
+ avd_sg_su_oper_list_add(cb, curr_susi->su, false);
+ i_sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN);
any_unassign_spsi = true;
// Need to rescan due to recursive dependencies
rescan = true;
diff --git a/osaf/services/saf/amf/amfd/cluster.cc b/osaf/services/saf/amf/amfd/cluster.cc
--- a/osaf/services/saf/amf/amfd/cluster.cc
+++ b/osaf/services/saf/amf/amfd/cluster.cc
@@ -76,14 +76,12 @@ void avd_cluster_tmr_init_evh(AVD_CL_CB
* system that are not NCS specific.
*/
- /* The SI Dependency could be broken due to failover or instantiation/
- * termination failure during headless.
- * adjust_delayed_sidep() removes SI(s) assignment which has any
- * unassigned sponsored SI.
+ /*
*
*/
if (cb->scs_absence_max_duration > 0) {
- adjust_delayed_sidep();
+ avd_adjust_intermediate_node();
+ avd_adjust_intermediate_ng();
}
for (std::map<std::string, AVD_SG*>::const_iterator it = sg_db->begin();
@@ -102,12 +100,23 @@ void avd_cluster_tmr_init_evh(AVD_CL_CB
* to satisfy the number of assignment configuration.
*/
if (cb->scs_absence_max_duration > 0) {
+ i_sg->adjust_intermediate_sg();
i_sg->adjust_delayed_failover(cb);
}
if (i_sg->sg_fsm_state == AVD_SG_FSM_STABLE)
i_sg->realign(cb, i_sg);
}
+ /* The SI Dependency could be broken due to failover or instantiation/
+ * termination failure during headless.
+ * adjust_delayed_sidep() removes SI(s) assignment which has any
+ * unassigned sponsored SI.
+ *
+ */
+ if (cb->scs_absence_max_duration > 0) {
+ adjust_delayed_sidep();
+ }
+
if (cb->scs_absence_max_duration > 0) {
TRACE("check if any SU is auto repair enabled");
diff --git a/osaf/services/saf/amf/amfd/include/node.h b/osaf/services/saf/amf/amfd/include/node.h
--- a/osaf/services/saf/amf/amfd/include/node.h
+++ b/osaf/services/saf/amf/amfd/include/node.h
@@ -221,12 +221,13 @@ extern uint32_t node_admin_unlock_instan
extern void avd_node_admin_lock_unlock_shutdown(AVD_AVND *node,
SaInvocationT invocation, SaAmfAdminOperationIdT operationId);
extern void node_reset_su_try_inst_counter(const AVD_AVND *node);
+extern void avd_adjust_intermediate_node();
/* AMF Node group */
extern SaAisErrorT avd_ng_config_get(void);
extern AVD_AMF_NG *avd_ng_get(const SaNameT *dn);
extern void avd_ng_constructor(void);
extern bool node_in_nodegroup(const std::string& node, const AVD_AMF_NG *ng);
-
+extern void avd_adjust_intermediate_ng();
/* AMF Node SW Bundle */
extern void avd_nodeswbundle_constructor(void);
diff --git a/osaf/services/saf/amf/amfd/include/sg.h b/osaf/services/saf/amf/amfd/include/sg.h
--- a/osaf/services/saf/amf/amfd/include/sg.h
+++ b/osaf/services/saf/amf/amfd/include/sg.h
@@ -424,7 +424,7 @@ public:
bool is_sg_serviceable_outside_ng(const AVD_AMF_NG *ng);
SaAisErrorT check_sg_stability();
bool ng_using_saAmfSGAdminState;
-
+ void adjust_intermediate_sg();
uint32_t term_su_list_in_reverse();
//Runtime calculates value of saAmfSGNumCurrAssignedSUs;
uint32_t curr_assigned_sus() const;
diff --git a/osaf/services/saf/amf/amfd/node.cc b/osaf/services/saf/amf/amfd/node.cc
--- a/osaf/services/saf/amf/amfd/node.cc
+++ b/osaf/services/saf/amf/amfd/node.cc
@@ -1509,6 +1509,20 @@ bool any_ng_in_locked_in_state(const AVD
return false;
}
+/*
+ *
+ */
+void avd_adjust_intermediate_node()
+{
+ for (std::map<std::string, AVD_AVND *>::const_iterator it = node_name_db->begin();
+ it != node_name_db->end(); it++) {
+ AVD_AVND *avnd = it->second;
+ osafassert(avnd);
+ if (avnd->saAmfNodeAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
+ node_admin_state_set(avnd, SA_AMF_ADMIN_LOCKED);
+ }
+}
+
void avd_node_constructor(void)
{
node_name_db = new AmfDb<std::string, AVD_AVND>;
diff --git a/osaf/services/saf/amf/amfd/nodegroup.cc b/osaf/services/saf/amf/amfd/nodegroup.cc
--- a/osaf/services/saf/amf/amfd/nodegroup.cc
+++ b/osaf/services/saf/amf/amfd/nodegroup.cc
@@ -1280,6 +1280,20 @@ done:
TRACE_LEAVE();
}
+/*
+ *
+ */
+void avd_adjust_intermediate_ng() {
+
+ for (std::map<std::string, AVD_AMF_NG*>::const_iterator it = nodegroup_db->begin();
+ it != nodegroup_db->end(); it++) {
+ AVD_AMF_NG *ng = it->second;
+ if (ng->saAmfNGAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) {
+ avd_ng_admin_state_set(ng, SA_AMF_ADMIN_LOCKED);
+ }
+ }
+}
+
/**
* Constructor for node group class. Should be called first of all.
*/
diff --git a/osaf/services/saf/amf/amfd/sg.cc b/osaf/services/saf/amf/amfd/sg.cc
--- a/osaf/services/saf/amf/amfd/sg.cc
+++ b/osaf/services/saf/amf/amfd/sg.cc
@@ -2084,3 +2084,23 @@ uint32_t AVD_SG::curr_non_instantiated_s
[](AVD_SU *su) -> bool { return ((su->list_of_susi == nullptr) &&
(su->saAmfSUPresenceState == SA_AMF_PRESENCE_UNINSTANTIATED));}));
}
+
+void AVD_SG::adjust_intermediate_sg()
+{
+ TRACE_ENTER();
+
+ // move SG from SHUTTING_DOWN to LOCKED
+ if (saAmfSGAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
+ avd_sg_admin_state_set(this, SA_AMF_ADMIN_LOCKED);
+ // directly move SU from SHUTTING_DOWN to LOCKED
+ for (const auto& su : list_of_su) {
+ if (su->saAmfSUAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
+ su->set_admin_state(SA_AMF_ADMIN_LOCKED);
+ }
+ // directly move SI from SHUTTING_DOWN to LOCKED
+ for (const auto& si : list_of_si) {
+ if (si->saAmfSIAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
+ si->set_admin_state(SA_AMF_ADMIN_LOCKED);
+ }
+ TRACE_LEAVE();
+}
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
@@ -3538,7 +3538,7 @@ void SG_2N::adjust_delayed_failover(AVD_
AVD_SU_SI_REL *curr_susi;
TRACE_ENTER();
- // Check AdminState of node/sg/su whether is LOCKED or SHUTTING_DOWN
+ // Check AdminState of node/sg/su whether is LOCKED
// which states will cause removal of assignment
for (const auto& su : list_of_su) {
SaAmfHAStateT su_ha_state;
@@ -3554,10 +3554,7 @@ void SG_2N::adjust_delayed_failover(AVD_
if (su->saAmfSUAdminState == SA_AMF_ADMIN_LOCKED ||
su->sg_of_su->saAmfSGAdminState == SA_AMF_ADMIN_LOCKED ||
- su->su_on_node->saAmfNodeAdminState == SA_AMF_ADMIN_LOCKED ||
- su->saAmfSUAdminState == SA_AMF_ADMIN_SHUTTING_DOWN ||
- su->sg_of_su->saAmfSGAdminState == SA_AMF_ADMIN_SHUTTING_DOWN ||
- su->su_on_node->saAmfNodeAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) {
+ su->su_on_node->saAmfNodeAdminState == SA_AMF_ADMIN_LOCKED) {
if (su->list_of_susi) {
su_ha_state = avd_su_state_determine(su);
@@ -3573,17 +3570,10 @@ void SG_2N::adjust_delayed_failover(AVD_
avd_sg_su_oper_list_add(cb, su, false);
set_fsm_state(AVD_SG_FSM_SG_REALIGN);
}
- // directly move from SHUTTING_DOWN to LOCKED
- if (su->saAmfSUAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
- su->set_admin_state(SA_AMF_ADMIN_LOCKED);
- if (su->sg_of_su->saAmfSGAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
- avd_sg_admin_state_set(su->sg_of_su, SA_AMF_ADMIN_LOCKED);
- if (su->su_on_node->saAmfNodeAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
- node_admin_state_set(su->su_on_node, SA_AMF_ADMIN_LOCKED);
}
}
- // Check AdminState of si whether is LOCKED or SHUTTING_DOWN
+ // Check AdminState of si whether is LOCKED
for (const auto& si : list_of_si) {
AVD_SU_SI_REL *curr_active_susi = nullptr;
@@ -3604,8 +3594,7 @@ void SG_2N::adjust_delayed_failover(AVD_
curr_susi->si->name.value,
curr_susi->state);
- if (si->saAmfSIAdminState == SA_AMF_ADMIN_SHUTTING_DOWN ||
- si->saAmfSIAdminState == SA_AMF_ADMIN_LOCKED) {
+ if (si->saAmfSIAdminState == SA_AMF_ADMIN_LOCKED) {
// only process assigned susi, ignore the others due to
// being modified or unassigned, ...
if (curr_susi->fsm == AVD_SU_SI_STATE_ASGND) {
@@ -3621,9 +3610,6 @@ void SG_2N::adjust_delayed_failover(AVD_
set_fsm_state(AVD_SG_FSM_SG_REALIGN);
avd_sg_su_oper_list_add(cb, curr_susi->su, false);
}
- // directly move from SHUTTING_DOWN to LOCKED
- if (si->saAmfSIAdminState == SA_AMF_ADMIN_SHUTTING_DOWN)
- si->set_admin_state(SA_AMF_ADMIN_LOCKED);
}
if (curr_susi->fsm != AVD_SU_SI_STATE_ASGND)
continue;
diff --git a/osaf/services/saf/amf/amfd/csi.cc b/osaf/services/saf/amf/amfd/csi.cc
--- a/osaf/services/saf/amf/amfd/csi.cc
+++ b/osaf/services/saf/amf/amfd/csi.cc
@@ -1466,7 +1466,14 @@ SaAisErrorT avd_compcsi_recreate(AVSV_N2
for (csicomp = info->csicomp_list; csicomp != nullptr; csicomp=csicomp->next) {
csi = csi_db->find(Amf::to_string(&csicomp->safCSI));
- osafassert(csi);
+ if (csi == nullptr) {
+ // CSI may be not found in csi_db. csi is deleted that trigger
+ // csi_remove_callback, but amf component hasn't responded to callback
+ // and at the time cluster goes headless. Therefore, amfd gets csi
+ // assignment for non-existed csi
+ LOG_WA("CSI: %s not found in csi_db", Amf::to_string(&csicomp->safCSI).c_str());
+ continue;
+ }
comp = comp_db->find(Amf::to_string(&csicomp->safComp));
osafassert(comp);
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
@@ -574,9 +574,11 @@ uint32_t avnd_su_curr_info_del(AVND_CB *
/* stop su_err_esc_tmr TBD Later */
/* disable the oper state (if pi su) */
- if (m_AVND_SU_IS_PREINSTANTIABLE(su) && (su->admin_op_Id != SA_AMF_ADMIN_RESTART)) {
- m_AVND_SU_OPER_STATE_SET(su, SA_AMF_OPERATIONAL_DISABLED);
- }
+ // TODO: reset healthy SU to DISABLED doesn't seem to be right, double check
+ // how SU Operational state being set in other places
+ //if (m_AVND_SU_IS_PREINSTANTIABLE(su) && (su->admin_op_Id != SA_AMF_ADMIN_RESTART)) {
+ // m_AVND_SU_OPER_STATE_SET(su, SA_AMF_OPERATIONAL_DISABLED);
+ //}
}
/* scan & delete the current info store in each component */
diff --git a/osaf/services/saf/amf/amfd/role.cc b/osaf/services/saf/amf/amfd/role.cc
--- a/osaf/services/saf/amf/amfd/role.cc
+++ b/osaf/services/saf/amf/amfd/role.cc
@@ -180,6 +180,11 @@
goto done;
}
+ if (avd_imm_impl_set() != SA_AIS_OK) {
+ LOG_ER("avd_imm_impl_set FAILED");
+ goto done;
+ }
+
if (avd_imm_config_get() != NCSCC_RC_SUCCESS) {
LOG_ER("avd_imm_config_get FAILED");
goto done;
@@ -187,11 +192,6 @@
cb->init_state = AVD_CFG_DONE;
- if (avd_imm_impl_set() != SA_AIS_OK) {
- LOG_ER("avd_imm_impl_set FAILED");
- goto done;
- }
-
avd_imm_update_runtime_attrs();
status = NCSCC_RC_SUCCESS;
diff --git a/osaf/services/saf/amf/amfd/siass.cc b/osaf/services/saf/amf/amfd/siass.cc
--- a/osaf/services/saf/amf/amfd/siass.cc
+++ b/osaf/services/saf/amf/amfd/siass.cc
@@ -888,7 +888,9 @@
susi->su->inc_curr_act_si();
susi->si->inc_curr_act_ass();
}
-
+ su->saAmfSUHostedByNode = node->name;
+ avd_saImmOiRtObjectUpdate(&su->name, "saAmfSUHostedByNode",
+ SA_IMM_ATTR_SANAMET, &su->saAmfSUHostedByNode);
m_AVSV_SEND_CKPT_UPDT_ASYNC_ADD(avd_cb, susi, AVSV_CKPT_AVD_SI_ASS);
}
diff --git a/osaf/services/saf/amf/amfnd/err.cc b/osaf/services/saf/amf/amfnd/err.cc
--- a/osaf/services/saf/amf/amfnd/err.cc
+++ b/osaf/services/saf/amf/amfnd/err.cc
@@ -774,25 +774,23 @@
goto done;
}
- // if headless, remove all assignments from this SU
+ // if headless, we have to perform the 'failover' without amfd
+ // for now, just terminate all components in the SU
if (cb->is_avd_down == true) {
- AVND_SU_SI_REC *si = 0;
- AVND_SU_SI_REC *next_si = 0;
- uint32_t rc = NCSCC_RC_SUCCESS;
- TRACE("Removing assignments from '%s'", su->name.value);
+ AVND_COMP *comp;
- m_AVND_SU_ASSIGN_PEND_SET(su);
+ LOG_NO("Terminating components of '%s'(abruptly & unordered)",su->name.value);
+ for (comp = m_AVND_COMP_FROM_SU_DLL_NODE_GET(m_NCS_DBLIST_FIND_FIRST(&su->comp_list));
+ comp;
+ comp = m_AVND_COMP_FROM_SU_DLL_NODE_GET(m_NCS_DBLIST_FIND_NEXT(&comp->su_dll_node))) {
+ if (comp->su->su_is_external)
+ continue;
- /* scan the su-si list & remove the sis */
- for (si = (AVND_SU_SI_REC *)m_NCS_DBLIST_FIND_FIRST(&su->si_list); si;) {
- next_si = (AVND_SU_SI_REC *)m_NCS_DBLIST_FIND_NEXT(&si->su_dll_node);
- rc = avnd_su_si_remove(cb, su, si);
+ rc = avnd_comp_clc_fsm_run(cb, comp, AVND_COMP_CLC_PRES_FSM_EV_CLEANUP);
if (NCSCC_RC_SUCCESS != rc) {
- LOG_ER("failed to remove SI assignment from '%s'",
- su->name.value);
- break;
+ LOG_ER("'%s' termination failed", comp->name.value);
+ goto done;
}
- si = next_si;
}
}
} else {
diff --git a/osaf/services/saf/amf/amfnd/susm.cc b/osaf/services/saf/amf/amfnd/susm.cc
--- a/osaf/services/saf/amf/amfnd/susm.cc
+++ b/osaf/services/saf/amf/amfnd/susm.cc
@@ -738,8 +738,12 @@
/* if no si is specified, the action is aimed at all the sis... pick up any si */
curr_si = (si) ? si : (AVND_SU_SI_REC *)m_NCS_DBLIST_FIND_FIRST(&su->si_list);
- if (!curr_si)
+ if (!curr_si) {
+ // @todo check this
+ LOG_NO("no SI found in '%s'", su->name.value);
+ m_AVND_SU_ALL_SI_RESET(su);
goto done;
+ }
/* initiate the si removal for pi su */
if (m_AVND_SU_IS_PREINSTANTIABLE(su)) {
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel