[SCM] CTDB repository - branch master updated - ctdb-1.0.65-30-ge50c966

Ronnie Sahlberg sahlberg at samba.org
Thu Dec 11 22:47:02 GMT 2008


The branch, master has been updated
       via  e50c9667b86160eb5dfb9868aff420b72f799a5f (commit)
       via  0c2a7bf18c65452ca1c2f0539bf692507d91e3c6 (commit)
       via  9c6816e040d42d293eaf9ce41eff639135e8b2f5 (commit)
      from  8a0df9324a03b0f17772c64a9331236126c22124 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e50c9667b86160eb5dfb9868aff420b72f799a5f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Dec 12 09:39:55 2008 +1100

    New version 1.0.68

commit 0c2a7bf18c65452ca1c2f0539bf692507d91e3c6
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 10 22:27:36 2008 +0100

    Improve the monitor event test for ethernet interfaces (link detection).
    
    On some systems, the ethtool link detection is not successful when a
    cable is plugged but the interface has not been brought up previously.
    This improves the test by bringing the interface up (without checking
    for success here) and trying the ethtool test again afterwards.
    
    Michael

commit 9c6816e040d42d293eaf9ce41eff639135e8b2f5
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 10 22:19:31 2008 +0100

    Use "grep -q" instead of "grep ... > /dev/null" in events.d/10.interfaces
    This enhances readability.
    
    Michael

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

Summary of changes:
 config/events.d/10.interface |   19 +++++++++++++------
 packaging/RPM/ctdb.spec      |   41 ++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 53 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index 4d07077..298f3e8 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -100,13 +100,13 @@ case $cmd in
 	# this _very_ annoying behaviour we have to keep a record of the secondaries and re-add
 	# them afterwards. yuck
 	secondaries=""
-	if /sbin/ip addr list dev $iface primary | grep "inet $ip/$maskbits " > /dev/null; then
+	if /sbin/ip addr list dev $iface primary | grep -q "inet $ip/$maskbits " ; then
 	    secondaries=`/sbin/ip addr list dev $iface secondary | grep " inet " | awk '{print $2}'`
 	fi
 	/sbin/ip addr del $ip/$maskbits dev $iface || failed=1
 	[ -z "$secondaries" ] || {
 	    for i in $secondaries; do
-		if /sbin/ip addr list dev $iface | grep "inet $i" > /dev/null; then
+		if /sbin/ip addr list dev $iface | grep -q "inet $i" ; then
 		    echo "kept secondary $i on dev $iface"
 		else 
 		    echo "re-adding secondary address $i to dev $iface"
@@ -147,7 +147,7 @@ case $cmd in
 	    case $IFACE in 
 	    bond*)
 		IFACE=`echo $IFACE |sed -e 's/\....$//'`
-		grep '^MII Status: up' /proc/net/bonding/$IFACE > /dev/null || {
+		grep -q '^MII Status: up' /proc/net/bonding/$IFACE || {
 			echo "ERROR: public network interface $IFACE is down"
 			exit 1
 		}
@@ -157,9 +157,16 @@ case $cmd in
 		;;
 	    *)
 		[ -z "$IFACE" ] || {
-	    	    /usr/sbin/ethtool $IFACE | grep 'Link detected: yes' > /dev/null || {
-			echo "ERROR: No link on the public network interface $IFACE"
-			exit 1
+		    /usr/sbin/ethtool $IFACE | grep -q 'Link detected: yes' || {
+			# On some systems, this is not successful when a
+			# cable is plugged but the interface has not been
+			# brought up previously. Bring the interface up and
+			# try again...
+			/sbin/ip link set $IFACE up
+			/usr/sbin/ethtool $IFACE | grep -q 'Link detected: yes' || {
+			    echo "ERROR: No link on the public network interface $IFACE"
+			    exit 1
+			}
 	    	    }
 		}
 		;;
diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 0c3ba05..03ca7fc 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
 Name: ctdb
 Version: 1.0
-Release: 67
+Release: 68
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -121,6 +121,45 @@ fi
 %{_includedir}/ctdb_private.h
 
 %changelog
+* Fri Dec 12 2008 : Version 1.0.68
+ - Fixes for monitoring of interfaces status from Michael Adam.
+ - Use -q instead of >/dev/null for grep to enhance readability of the
+   scripts from Michael Adam.
+ - Update to the "ctdb recover" command. This command now block until the
+   has completed. This makes it much easier to use in scripts and avoids
+   the common workaround :
+      ctdb recover
+      ... loop while waiting for recovery completes ...
+      continue ...
+ - Add a CTDB_TIMEOUT variable. If set, this variable provides an automatic
+   timeout for "ctdb <command>", similar to using -T <timeout>
+ - Set a unique errorcode for "ctdb <command>" when it terminates due to a 
+   timeout so that scripts can distinguish between a hung command and what was
+   just a failure.
+ - Update "ctdb ban/unban" so that if the cluster is in recovery these commands
+   blocks and waits until after recovery is complete before the perform the
+   ban/unban operation. This is necessary since the recovery process can cause
+   nodes to become automatically unbanned.
+ - Update "ctdb ban/unban" to block until the recovery that will follow shortly
+   after this command has completed.
+   This makes it much easier to use in scripts and avoids the common
+   workaround :
+      ctdb ban/unban
+      ... loop while waiting for recovery completes ...
+      continue ...
+ - Bugfix for the new flags handling in 1.0.67. Abort and restart monitoring
+   if we failed to get proper nodemaps from a remote node instead of
+   dereferencing a null pointer.
+ - If ctdbd was explicitely started with the '--socket' argument, make
+   ctdbd automatically set CTDB_SOCKET to the specified argument.
+   This ensures that eventscripts spawned by the ctdb daemon will default to
+   using the same socket and talk to the correct daemon.
+   This primarily affects running multiple daemons on the same host and where 
+   you want each instance of ctdb daemons have their eventscripts talk to the
+   "correct" daemon.
+ - Update "ctdb ping" to return an error code if the ping fail so that it
+   can be used in scripts.
+ - Update to how to synchronize management of node flags across the cluster.
 * Thu Dec 3 2008 : Version 1.0.67
  - Add a document describing the recovery process.
  - Fix a bug in "ctdb setdebug" where it would refuse to set a negative


-- 
CTDB repository


More information about the samba-cvs mailing list