osaf/services/saf/amf/amfd/ndfsm.cc |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Today amfd exits when the /etc/init.d/opensafd script invokes osaf-amfd clc-cli 
script.
This delayed exit can cause two problems 1) amfd exit can create a race with 
dtmd exit
2) The delayed exit can create problems during failover like say the amfd on 
the new active
becomes functionally active and the old active still has a stale amfd.
The patch makes AMFD exit immediately upon recieving amfnd down event.

diff --git a/osaf/services/saf/amf/amfd/ndfsm.cc 
b/osaf/services/saf/amf/amfd/ndfsm.cc
--- a/osaf/services/saf/amf/amfd/ndfsm.cc
+++ b/osaf/services/saf/amf/amfd/ndfsm.cc
@@ -27,6 +27,7 @@
 
 #include <amfd.h>
 #include <cluster.h>
+#include <daemon.h>
 
 /*****************************************************************************
  * Function: avd_node_up_func
@@ -321,7 +322,8 @@ void avd_mds_avnd_down_evh(AVD_CL_CB *cb
                // Do nothing if the local node goes down. Most likely due to 
system shutdown.
                // If node director goes down due to a bug, the AMF watchdog 
will restart the node.
                if (node->node_info.nodeId == cb->node_id_avd) {
-                       TRACE("Ignoring down event for local node director");
+                       LOG_NO("exiting (local AMFND down)");
+                       _Exit(0);
                        goto done;
                }
 

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to