[Ocfs2-tools-commits] smushran commits r845 - in trunk: o2cb_ctl ocfs2_hb_ctl vendor/common

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Apr 26 19:54:21 CDT 2005


Author: smushran
Signed-off-by: mfasheh
Date: 2005-04-26 19:54:18 -0500 (Tue, 26 Apr 2005)
New Revision: 845

Modified:
   trunk/o2cb_ctl/o2cb_ctl.c
   trunk/ocfs2_hb_ctl/ocfs2_hb_ctl.c
   trunk/vendor/common/o2cb.init
Log:
o2cb service offlines if o2cb_ctl encounters any errors... like no local node found
Signed-off-by: mfasheh

Modified: trunk/o2cb_ctl/o2cb_ctl.c
===================================================================
--- trunk/o2cb_ctl/o2cb_ctl.c	2005-04-26 22:28:53 UTC (rev 844)
+++ trunk/o2cb_ctl/o2cb_ctl.c	2005-04-27 00:54:18 UTC (rev 845)
@@ -1361,6 +1361,9 @@
     int rc;
     O2CBContext ctxt = {0, };
 
+    setbuf(stdout, NULL);
+    setbuf(stderr, NULL);
+
     initialize_o2cb_error_table();
     rc = parse_options(argc, argv, &ctxt);
     if (rc)

Modified: trunk/ocfs2_hb_ctl/ocfs2_hb_ctl.c
===================================================================
--- trunk/ocfs2_hb_ctl/ocfs2_hb_ctl.c	2005-04-26 22:28:53 UTC (rev 844)
+++ trunk/ocfs2_hb_ctl/ocfs2_hb_ctl.c	2005-04-27 00:54:18 UTC (rev 845)
@@ -207,6 +207,9 @@
 	struct hb_ctl_options hbo = { HB_ACTION_UNKNOWN, NULL, NULL };
 	char hbuuid[33];
 
+	setbuf(stdout, NULL);
+	setbuf(stderr, NULL);
+
 	initialize_ocfs_error_table();
 	initialize_o2dl_error_table();
 	initialize_o2cb_error_table();

Modified: trunk/vendor/common/o2cb.init
===================================================================
--- trunk/vendor/common/o2cb.init	2005-04-26 22:28:53 UTC (rev 844)
+++ trunk/vendor/common/o2cb.init	2005-04-27 00:54:18 UTC (rev 845)
@@ -484,6 +484,17 @@
 
     echo -n "Starting cluster ${CLUSTER}: "
     OUTPUT="`o2cb_ctl -H -n "${CLUSTER}" -t cluster -a online=yes 2>&1`"
+    if [ $? = 0 ]
+    then
+        echo "OK"
+        return
+    else
+        echo "Failed"
+        echo "$OUTPUT"
+    fi
+
+    echo -n "Stopping cluster ${CLUSTER}: "
+    OUTPUT="`o2cb_ctl -H -n "${CLUSTER}" -t cluster -a online=no 2>&1`"
     if_fail "$?" "$OUTPUT"
 }
 



More information about the Ocfs2-tools-commits mailing list