fence: simplify init script
authorAndrew Price <andy@andrewprice.me.uk>
Fri, 25 Jul 2008 09:04:35 +0000 (11:04 +0200)
committerFabio M. Di Nitto <fdinitto@redhat.com>
Fri, 25 Jul 2008 09:04:35 +0000 (11:04 +0200)
fence_scsi needs cman to run. Verify that cman is running
as first thing, before querying for config information that
are now stored in cman/aisexec.

cman already guarantees that all nodes have a nodeid. Drop
this redundant check.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
fence/agents/scsi/scsi_reserve

index 00fc650683665c20b493b6ecd56c2ae3d33a7bd5..3d669917d749861d64f8347820288c29637d3d4f 100644 (file)
@@ -23,19 +23,19 @@ if [ -f /etc/sysconfig/scsi_reserve ] ; then
     . /etc/sysconfig/scsi_reserve
 fi
 
-# check if cluster is configured for fence_scsi
+# check that cman is running
 #
-if ! fence_scsi_test -t fence ; then
+if ! cman_tool status &> /dev/null ; then
     logger -t scsi_reserve \
-       "[error] cluster not configured for scsi reservations"
+       "[error] cman does not appear to be running"
     exit 1
 fi
 
-# check for nodeids in config file
+# check if cluster is configured for fence_scsi
 #
-if ! fence_scsi_test -t nodes ; then
+if ! fence_scsi_test -t fence ; then
     logger -t scsi_reserve \
-       "[error] cluster must define nodeid for all nodes"
+       "[error] cluster not configured for scsi reservations"
     exit 1
 fi
 
@@ -47,14 +47,6 @@ if ! sg_persist -V &> /dev/null ; then
     exit 1
 fi
 
-# check that cman is running
-#
-if ! cman_tool status &> /dev/null ; then
-    logger -t scsi_reserve \
-       "[error] cman does not appear to be running"
-    exit 1
-fi
-
 # get physical volumes (devices) that are part of cluster volumes
 #
 scsi_devices=$( vgs --config 'global { locking_type = 0 }' \
This page took 0.085146 seconds and 5 git commands to generate.