Divide the safe reboot in the opensaf_reboot script into two phases: in the
first phase we stop important OpenSAF services (currently only IMM), and in the
second phase we reboot the nodes.
---
 scripts/opensaf_reboot | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/opensaf_reboot b/scripts/opensaf_reboot
index 6071f7a66..b8a5737d0 100644
--- a/scripts/opensaf_reboot
+++ b/scripts/opensaf_reboot
@@ -47,6 +47,13 @@ test $(id -u) -ne 0 && icmd=$(which sudo 2> /dev/null)
 
 opensaf_safe_reboot()
 {
+       # Phase one: stop IMM to prevent sync
+       logger -t "opensaf_reboot" "Stopping IMMND"
+       $icmd pkill -STOP osafimmnd
+       # Wait until IMM has been stopped on all nodes in the cluster
+       sleep 5
+       # Phase two: IMM is stopped on all nodes, so now we can safely reboot
+       # the cluster
        logger -t "opensaf_reboot" "Rebooting local node using $icmd 
/sbin/shutdown -r now"
        $icmd /sbin/shutdown -r now
 }
-- 
2.13.3


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to