[Pvfs2-cvs] commit by pcarns in pvfs2-1/examples/heartbeat: Filesystem-qla-monitor PVFS2 PVFS2-notify apc-switched-pdu-hybrid-control.pl pvfs2-ha-heartbeat-configure.sh

CVS commit program cvs at parl.clemson.edu
Mon Jan 28 16:18:27 EST 2008


Update of /projects/cvsroot/pvfs2-1/examples/heartbeat
In directory parlweb1:/tmp/cvs-serv25344/examples/heartbeat

Modified Files:
      Tag: small-file-branch
	Filesystem-qla-monitor PVFS2 PVFS2-notify 
	apc-switched-pdu-hybrid-control.pl 
	pvfs2-ha-heartbeat-configure.sh 
Log Message:
merging db bug fix and heartbeat updates from trunk; I may want to reuse
some logic from the former to identify peer servers on startup


Index: Filesystem-qla-monitor
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/examples/heartbeat/Filesystem-qla-monitor,v
diff -p -u -r1.1 -r1.1.6.1
--- Filesystem-qla-monitor	7 Nov 2007 21:54:12 -0000	1.1
+++ Filesystem-qla-monitor	28 Jan 2008 21:18:27 -0000	1.1.6.1
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Id: Filesystem-qla-monitor,v 1.1 2007/11/07 21:54:12 slang Exp $
+# $Id: Filesystem-qla-monitor,v 1.1.6.1 2008/01/28 21:18:27 pcarns Exp $
 #
 # Support:      linux-ha at lists.linux-ha.org
 # License:      GNU General Public License (GPL)
@@ -81,7 +81,12 @@
 #######################################################################
 # Initialization:
 
+# newer versions of heartbeat have moved the ocf-shellfuncs  file
+if [ -f /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs ] ; then
+. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs
+else
 . /usr/lib/heartbeat/ocf-shellfuncs
+fi
 
 #######################################################################
 
@@ -103,7 +108,7 @@ check_util () {
 usage() {
 	cat <<-EOT
 	usage: $0 {start|stop|status|monitor|validate-all|meta-data}
-	$Id: Filesystem-qla-monitor,v 1.1 2007/11/07 21:54:12 slang Exp $
+	$Id: Filesystem-qla-monitor,v 1.1.6.1 2008/01/28 21:18:27 pcarns Exp $
 	EOT
 }
 

Index: PVFS2
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/examples/heartbeat/PVFS2,v
diff -p -u -r1.1 -r1.1.6.1
--- PVFS2	7 Nov 2007 21:54:12 -0000	1.1
+++ PVFS2	28 Jan 2008 21:18:27 -0000	1.1.6.1
@@ -27,7 +27,12 @@
 
 VARRUN=/var/run
 
+# newer versions of heartbeat have moved the ocf-shellfuncs  file
+if [ -f /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs ] ; then
+. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs
+else
 . /usr/lib/heartbeat/ocf-shellfuncs
+fi
 
 #######################################################################
 #
@@ -172,8 +177,18 @@ stop_pvfs2() {
     if
       ProcessRunning $PVFS2PID
     then
-      ocf_log info "$CMD still running ($PVFS2PID)."
-      false
+      sleep 1
+      kill -9 $PVFS2PID >/dev/null 2>&1
+      ocf_log warn "Killing (-9) pvfs2-server PID $PVFS2PID"
+      sleep 5
+      if
+        ProcessRunning $PVFS2PID
+      then
+        ocf_log info "$CMD still running ($PVFS2PID)."
+        false
+      else
+        ocf_log info "$CMD stopped."
+      fi
     else
       ocf_log info "$CMD stopped."
     fi

Index: PVFS2-notify
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/examples/heartbeat/PVFS2-notify,v
diff -p -u -r1.1 -r1.1.6.1
--- PVFS2-notify	7 Nov 2007 21:54:12 -0000	1.1
+++ PVFS2-notify	28 Jan 2008 21:18:27 -0000	1.1.6.1
@@ -21,7 +21,12 @@ MAILTOFILE=$VARRUN/PVFS2_notify
 #######################################################################
 # Initialization:
 
+# newer versions of heartbeat have moved the ocf-shellfuncs  file
+if [ -f /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs ] ; then
+. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs
+else
 . /usr/lib/heartbeat/ocf-shellfuncs
+fi
 
 #######################################################################
 
@@ -31,7 +36,7 @@ us=`uname -n`
 
 usage() {
   echo "Usage: $0 {start|stop|status|monitor|meta-data|validate-all}"
-  echo "$Id: PVFS2-notify,v 1.1 2007/11/07 21:54:12 slang Exp $"
+  echo "$Id: PVFS2-notify,v 1.1.6.1 2008/01/28 21:18:27 pcarns Exp $"
 }
 
 meta_data() {

Index: apc-switched-pdu-hybrid-control.pl
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/examples/heartbeat/apc-switched-pdu-hybrid-control.pl,v
diff -p -u -r1.1 -r1.1.6.1
--- apc-switched-pdu-hybrid-control.pl	7 Nov 2007 21:54:12 -0000	1.1
+++ apc-switched-pdu-hybrid-control.pl	28 Jan 2008 21:18:27 -0000	1.1.6.1
@@ -45,7 +45,6 @@ else
 my $snmp_output = `$snmp_command 2>&1`;
 if ( $? == 0 )
 {
-   print "Success, snmp\n";
    exit 0;
 }
 
@@ -55,7 +54,6 @@ my $ssh_command = "/usr/bin/apc-switched
 my $ssh_output = `$ssh_command 2>&1`;
 if ( $? == 0 )
 {
-   print "Success, ssh\n";
    exit 0;
 }
 

Index: pvfs2-ha-heartbeat-configure.sh
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/examples/heartbeat/pvfs2-ha-heartbeat-configure.sh,v
diff -p -u -r1.1 -r1.1.6.1
--- pvfs2-ha-heartbeat-configure.sh	7 Nov 2007 21:54:12 -0000	1.1
+++ pvfs2-ha-heartbeat-configure.sh	28 Jan 2008 21:18:27 -0000	1.1.6.1
@@ -30,6 +30,7 @@ echo "auto_failback off" >> ${OUTDIR}/ha
 echo "use_logd no" >> ${OUTDIR}/ha.cf
 echo "respawn hacluster /usr/lib/heartbeat/cibmon -d" >> ${OUTDIR}/ha.cf
 echo "crm yes" >> ${OUTDIR}/ha.cf
+echo "compression bz2" >> ${OUTDIR}/ha.cf
 
 # shift arguments down
 shift



More information about the Pvfs2-cvs mailing list