During SC starts up, the remain SC is down. At that time,
amfnd try to convert clm node to amf node. Immnd will unregister
with MDS in 1 second before register again. Amfnd will failed asap
in initialize search clmNode. Amfnd crashes due to amf_nodeName is
empty.

Amfnd need to exit failure to recover automatically in this case.
---
 src/amf/amfnd/clm.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/amf/amfnd/clm.cc b/src/amf/amfnd/clm.cc
index 73c8ff83c..43ac202ed 100644
--- a/src/amf/amfnd/clm.cc
+++ b/src/amf/amfnd/clm.cc
@@ -124,9 +124,9 @@ static void clm_to_amf_node(void) {
 
   error = saImmOmInitialize_cond(&immOmHandle, nullptr, &immVersion);
   if (SA_AIS_OK != error) {
-    LOG_WA("saImmOmInitialize failed. Use previous value of nodeName.");
-    osafassert(avnd_cb->amf_nodeName.empty() == false);
-    goto done1;
+    LOG_WA("saImmOmInitialize failed: %u. Use previous value of nodeName.",
+            error);
+    exit(EXIT_FAILURE);
   }
 
   error = amf_saImmOmSearchInitialize_o2(
@@ -157,7 +157,6 @@ static void clm_to_amf_node(void) {
 done:
   immutil_saImmOmSearchFinalize(searchHandle);
   immutil_saImmOmFinalize(immOmHandle);
-done1:
   TRACE_LEAVE2("%u", error);
 }
 
-- 
2.17.1



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to