With NPI component configured with saAmfCtDefDisableRestart=1. Once invoking
restart admin op, amfnd does not remove the assignment and cause the crash.

Remove assignment before change the pres state to TERMINATION in clc.
---
 src/amf/amfnd/clc.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/amf/amfnd/clc.cc b/src/amf/amfnd/clc.cc
index c8e60e6..126362b 100644
--- a/src/amf/amfnd/clc.cc
+++ b/src/amf/amfnd/clc.cc
@@ -2217,6 +2217,10 @@ uint32_t avnd_comp_clc_inst_restart_hdler(AVND_CB *cb, 
AVND_COMP *comp) {
         /* invoke terminate callback */
         rc = avnd_comp_cbk_send(cb, comp, AVSV_AMF_COMP_TERM, 0, 0);
     else {
+      /* For NPI component with DisableRestart=1 */
+      if (m_AVND_COMP_IS_RESTART_DIS(comp) && (comp->csi_list.n_nodes > 0)) {
+        su_send_suRestart_recovery_msg(comp->su);
+      }
       rc =
           avnd_comp_clc_cmd_execute(cb, comp, 
AVND_COMP_CLC_CMD_TYPE_TERMINATE);
       m_AVND_COMP_REG_PARAM_RESET(cb, comp);
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to