Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: cts by panjiam from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: cts by panjiam from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: debian by horms from 
      (linux-ha-cvs@lists.linux-ha.org)


----------------------------------------------------------------------

Message: 1
Date: Thu, 29 Jun 2006 20:11:07 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cts

Dir     : linux-ha/cts


Modified Files:
        OCFMSDummy.in 


Log Message:
avoid file operations; use ocf_log instead of built-in log
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/OCFMSDummy.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- OCFMSDummy.in       22 May 2006 11:03:41 -0000      1.3
+++ OCFMSDummy.in       30 Jun 2006 02:11:06 -0000      1.4
@@ -19,16 +19,6 @@
 [EMAIL PROTECTED]@/heartbeat/OCFMSDummy
 [EMAIL PROTECTED]@/heartbeat/cts/OCFMSDummy
 
-DUMMY_LOGFILE="/var/log/OCFMSDummy.lOG"
-
-if [ "x$OCF_RESKEY_resource" != "x" ]; then
-        DUMMY_RESOURCE=$OCF_RESKEY_resource
-fi
-
-if [ "x$OCF_RESKEY_logfile" != "x" ]; then
-       DUMMY_LOGFILE=$OCF_RESKEY_logfile
-fi
-
 start_delay=1
 
 stop_delay=1
@@ -37,11 +27,6 @@
 demote_delay=1
 notify_delay=1
 
-dummy_log () {
-    echo $1 $2 $3
-    echo `date +%T` $1 $2 $3 >> $DUMMY_LOGFILE
-}
-
 do_cmd() {
     local cmd="$*"
     ocf_log debug "$RESOURCE: Calling $cmd"
@@ -63,27 +48,25 @@
 
 
 dummy_get_status() {
-    tmp=`mktemp`
     instance=$1
     basename=`basename $DUMMY_RESOURCE`
-    $PS $basename > $tmp
-    $GREP -e "$basename.*#$instance" $tmp > /dev/null 
+    result=`$PS $basename`
+    echo $result | $GREP -e "$basename.*#$instance" >/dev/null 
     running=$?
 
     if [ ! $running -eq 0 ]; then
-         dummy_log "status: instance #$instance not running"
+         ocf_log info "status: instance #$instance not running"
          return $OCF_NOT_RUNNING
     fi
-    $GREP -e "master #$instance" $tmp > /dev/null
+    echo $result | $GREP -e "master #$instance" >/dev/null
     state=$?
 
-    rm -rf $tmp
 
     if [ $state -eq 0 ]; then    # master
-        dummy_log "status: instance #$instance is running as master"
+        ocf_log info "status: instance #$instance is running as master"
         return $OCF_RUNNING_MASTER
     else        # slave
-        dummy_log "status: instance #$instance is running as slave"
+        ocf_log info "status: instance #$instance is running as slave"
         return $OCF_SUCCESS
     fi 
 }
@@ -109,7 +92,7 @@
     rm -f $tmp
 
     for pid in $pids; do
-        dummy_log "trying to kill pid $pid (instance #$instance)"
+        ocf_log info "trying to kill pid $pid (instance #$instance)"
         kill -9 $pid
     done
     return $OCF_SUCCESS
@@ -118,24 +101,24 @@
 do_change_state() {
     instance=$1
     request_state=$2
-    dummy_log "before state changed: "
+    ocf_log info "before state changed: "
     dummy_get_status $instance
     # not running, can't promote
     if [ $? -eq $OCF_NOT_RUNNING ] ;then
-        dummy_log "instance #$instance not running, can't change state"
+        ocf_log info "instance #$instance not running, can't change state"
         return $OCF_ERROR;
     fi
     do_stop_resource $instance
     do_start_resource $instance $request_state
     rc=$?
-    dummy_log "after state changed: "
+    ocf_log info "after state changed: "
     dummy_get_status $instance
     return $rc
 }
 
 
 dummy_start() {
-    dummy_log "start instance #$OCF_RESKEY_CRM_meta_clone slave"
+    ocf_log info "start instance #$OCF_RESKEY_CRM_meta_clone slave"
     do_start_resource $OCF_RESKEY_CRM_meta_clone "slave"
     if [ $OCF_RESKEY_CRM_meta_clone -eq 0 ]; then
         do_cmd $CRM_MASTER -v 1000
@@ -146,7 +129,7 @@
 
 dummy_stop() {
     touch $DUMMY_RESOURCE
-    dummy_log "stop instance #$OCF_RESKEY_CRM_meta_clone"
+    ocf_log info "stop instance #$OCF_RESKEY_CRM_meta_clone"
     do_stop_resource $OCF_RESKEY_CRM_meta_clone
     rc=$?
     sleep $stop_delay
@@ -154,7 +137,7 @@
 }
 
 dummy_monitor() {
-    dummy_log "monitor instance #$OCF_RESKEY_CRM_meta_clone"
+    ocf_log info "monitor instance #$OCF_RESKEY_CRM_meta_clone"
     dummy_get_status $OCF_RESKEY_CRM_meta_clone
     rc=$?
     sleep $monitor_delay
@@ -162,7 +145,7 @@
 }
 
 dummy_promote() {
-    dummy_log "promote instance #$OCF_RESKEY_CRM_meta_clone"
+    ocf_log info "promote instance #$OCF_RESKEY_CRM_meta_clone"
     do_change_state $OCF_RESKEY_CRM_meta_clone "master"
     rc=$?
     sleep $promote_delay
@@ -170,7 +153,7 @@
 }
 
 dummy_demote() {
-    dummy_log "demote instance #$OCF_RESKEY_CRM_meta_clone"
+    ocf_log info "demote instance #$OCF_RESKEY_CRM_meta_clone"
     do_change_state $OCF_RESKEY_CRM_meta_clone "slave"
     rc=$?
     sleep $demote_delay
@@ -178,7 +161,7 @@
 }
 
 dummy_notify() {
-    dummy_log "notify instance #$OCF_RESKEY_CRM_meta_clone"
+    ocf_log info "notify instance #$OCF_RESKEY_CRM_meta_clone"
     touch $DUMMY_RESOURCE
     sleep $notify_delay
         local n_type="$OCF_RESKEY_CRM_meta_notify_type"
@@ -234,7 +217,7 @@
 {
        echo "OCFMSDummy start|stop|monitor|promote|demote|notify"
 }
-case $1 in
+case $__OCF_ACTION in
     start)   dummy_start   ;;
     stop)    dummy_stop    ;;
     monitor) dummy_monitor ;;
@@ -246,6 +229,6 @@
 # master and slave are resource operations. 
     master)  dummy_resource_run_loop ;;
     slave)   dummy_resource_run_loop ;;
-    *) usage $1
+    *) usage $__OCF_ACTION
        exit $OCF_ERR_ARGS ;;
 esac




------------------------------

Message: 2
Date: Thu, 29 Jun 2006 20:15:18 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cts

Dir     : linux-ha/cts


Modified Files:
        CTS.py.in 


Log Message:
wait until node is booted and sshd is up
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTS.py.in,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- CTS.py.in   1 Jun 2006 08:57:00 -0000       1.61
+++ CTS.py.in   30 Jun 2006 02:15:17 -0000      1.62
@@ -362,12 +362,15 @@
         '''Return TRUE if the given node is booted (responds to pings'''
         return os.system("@PING@ -nq -c1 @PING_TIMEOUT_OPT@ %s >/dev/null 
2>&1" % node) == 0
 
+    def IsSshdUp(self, node):
+         return os.system("@SSH@ %s echo >/dev/null 2>&1" % node) == 0
+
     def WaitForNodeToComeUp(self, node, Timeout=300):
         '''Return TRUE when given node comes up, or None/FALSE if timeout'''
         timeout=Timeout
         anytimeouts=0
         while timeout > 0:
-            if self.IsNodeBooted(node):
+            if self.IsNodeBooted(node) and self.IsSshdUp(node):
                 if anytimeouts:
                      # Fudge to wait for the system to finish coming up
                      time.sleep(30)




------------------------------

Message: 3
Date: Thu, 29 Jun 2006 21:06:58 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: debian by horms from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : horms
Host    : 
Project : linux-ha
Module  : debian

Dir     : linux-ha/debian


Modified Files:
        changelog heartbeat-2.postrm 


Log Message:
Debian packaging update

heartbeat-2 (2.0.5-7) unstable; urgency=low

  * Don't run deluser and delgroup in postrm
    - These commands may not be available at this time (closes: #375941)
    - If there are any files left that belong to this user or group
      then they will be left unowned and get inhereited by the
      next user that comes along that happens to have hacluster's
      old userid or the old haclient groupid respectively.

http://bugs.debian.org/375941

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/debian/changelog,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- changelog   12 Jun 2006 08:26:52 -0000      1.67
+++ changelog   30 Jun 2006 03:06:58 -0000      1.68
@@ -1,3 +1,14 @@
+heartbeat-2 (2.0.5-7) unstable; urgency=low
+
+  * Don't run deluser and delgroup in postrm
+    - These commands may not be available at this time (closes: #375941)
+    - If there are any files left that belong to this user or group
+      then they will be left unowned and get inhereited by the
+      next user that comes along that happens to have hacluster's
+      old userid or the old haclient groupid respectively.
+
+ -- Simon Horman <[EMAIL PROTECTED]>  Thu, 29 Jun 2006 15:13:26 +0900
+
 heartbeat-2 (2.0.5-5) unstable; urgency=low
 
   * Reverse the change made in 2.0.5-4
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/debian/heartbeat-2.postrm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- heartbeat-2.postrm  1 Aug 2005 08:21:49 -0000       1.1
+++ heartbeat-2.postrm  30 Jun 2006 03:06:58 -0000      1.2
@@ -23,17 +23,6 @@
         ldconfig
        update-rc.d -f heartbeat remove >/dev/null
        rm -f /var/lib/heartbeat/fifo
-elif [ "$1" = "purge" ]; then
-       if getent passwd hacluster > /dev/null ; then
-               deluser hacluster
-       fi
-       if getent group haclient > /dev/null ; then
-               # delgroup will fail if any users have haclient
-               # as their primary group. As these may have
-               # been added outside of the control of this package,
-               # just continue of this fails.
-               delgroup haclient || true
-       fi
 fi
 
 # dh_installdeb will replace this with shell code automatically




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 31, Issue 98
********************************************

Reply via email to