[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-278-gf098854

Ronnie Sahlberg sahlberg at samba.org
Tue Dec 21 16:55:53 MST 2010


The branch, 1.2 has been updated
       via  f098854500f36b03ebf6c3b4a6da0dd867ce9cf1 (commit)
       via  d21b3a2f527c4f4ca9cf2689d86335b3e7d1a6fe (commit)
       via  f0593e8571f22fa47dc5065263c43c7c744eb117 (commit)
       via  95f3ad0206f1bf010a74aa47b6d77cae9c559d5e (commit)
      from  9c3e30d30cac686f3be8c61412754577a072ece3 (commit)

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


- Log -----------------------------------------------------------------
commit f098854500f36b03ebf6c3b4a6da0dd867ce9cf1
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Dec 22 10:39:25 2010 +1100

    New version 1.2.16
    
     - 50.samba  dont run serverid wipe in the background in case it
       is so slow to start that samba manages to come up before it finishes.
     - 60.nfs  wait 10 intervals before trying to restart lockd.
       flag the node unhealthy after 15 failures.
       CQ S1021266
     - 41.httpd  httpd can sometimes be slow, wait 5 intervals before we try to
       restart it and 10 intervals before we flag the node unhealthy.

commit d21b3a2f527c4f4ca9cf2689d86335b3e7d1a6fe
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Dec 22 10:27:53 2010 +1100

    41.HTTPD
    
    Httpd can be very slow to start on some platforms,
    wait 5 monitor intervals before we try to restart it if
    it has not bound to port 80 yet.
    After 10 failed intervals, flag the node as unhealthy.

commit f0593e8571f22fa47dc5065263c43c7c744eb117
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Dec 22 10:09:35 2010 +1100

    60.nfs
    
    Try to restart LOCKD after 10 failures and
    flag the node as unhealthy after 15 failures

commit 95f3ad0206f1bf010a74aa47b6d77cae9c559d5e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Dec 22 10:05:40 2010 +1100

    Dont run net serverid wipe in the background

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

Summary of changes:
 config/events.d/41.httpd   |   21 +++++++++++++++++----
 config/events.d/50.samba   |    2 +-
 config/events.d/60.nfs     |   29 +++++++++++++++++++++++------
 packaging/RPM/ctdb.spec.in |   10 +++++++++-
 4 files changed, 50 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/41.httpd b/config/events.d/41.httpd
index 15a35ea..e94bde3 100755
--- a/config/events.d/41.httpd
+++ b/config/events.d/41.httpd
@@ -52,10 +52,23 @@ case "$1" in
 	    exit 0
 	fi
 
-	if ! ctdb_check_tcp_ports 80 ; then
-	    echo "HTTPD is not running. Trying to restart HTTPD."
-	    ctdb_service_start
-	    exit 1
+	if ctdb_check_tcp_ports 80 >/dev/null 2>/dev/null ; then
+	    ctdb_counter_init
+	else
+	    ctdb_counter_incr
+
+	    ctdb_check_counter_equal 5 || {
+		echo "HTTPD is not running. Trying to restart HTTPD."
+		ctdb_service_stop
+		ctdb_service_start
+		exit 0
+	    }
+            ctdb_check_counter_limit 10 quiet|| {
+		echo "HTTPD is not running. Trying to restart HTTPD."
+		ctdb_service_stop
+		ctdb_service_start
+		exit 1
+	    }
 	fi
 	;;
 
diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index c4637c0..a1f99fb 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -72,7 +72,7 @@ start_samba() {
 	# the number of smbd processes will mean that it leaves few cycles for
 	# anything else
 	[ "$CTDB_MANAGES_SAMBA" = "yes" ] && {
-		/usr/bin/net serverid wipe &
+		/usr/bin/net serverid wipe
 
 		nice_service "$CTDB_SERVICE_NMB" start
 		nice_service "$CTDB_SERVICE_SMB" start
diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index a8fe243..87955df 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -107,12 +107,29 @@ case "$1" in
 	} || exit $?
 
 	# check that lockd responds to rpc requests
-	ctdb_check_rpc "LOCKD" 100021 1 || {
-		echo "Trying to restart lock manager service"
-		startstop_nfs restart
-		startstop_nfslock restart
-		exit 1
-	}
+	if ctdb_check_rpc "LOCKD" 100021 1 >/dev/null ; then
+		(service_name="lockd"; ctdb_counter_init)
+	else
+		(
+			service_name="lockd"
+			ctdb_counter_incr
+
+			ctdb_check_counter_equal 10 || {
+				echo "Trying to restart NFS lock service"
+				startstop_nfs restart >/dev/null 2>&1 &
+				startstop_nfslock restart  >/dev/null 2>&1 &
+				exit 0
+			}
+
+			ctdb_check_counter_limit 15 quiet >/dev/null
+	) || {
+			echo "$ctdb_check_rpc_out"
+			echo "Trying to restart NFS lock service"
+			startstop_nfs restart
+			startstop_nfslock restart
+			exit 1
+		}
+	fi
 
 	# mount needs special handling since it is sometimes not started
 	# correctly on RHEL5
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 5900b1d..72dcd20 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -3,7 +3,7 @@ Name: ctdb
 Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
-Version: 1.2.15
+Version: 1.2.16
 Release: 1GITHASH
 Epoch: 0
 License: GNU GPL version 3
@@ -143,6 +143,14 @@ development libraries for ctdb
 %{_libdir}/libctdb.a
 
 %changelog
+* Wed Dec 22 2010 : Version 1.2.16
+ - 50.samba  dont run serverid wipe in the background in case it
+   is so slow to start that samba manages to come up before it finishes.
+ - 60.nfs  wait 10 intervals before trying to restart lockd.
+   flag the node unhealthy after 15 failures.
+   CQ S1021266
+ - 41.httpd  httpd can sometimes be slow, wait 5 intervals before we try to
+   restart it and 10 intervals before we flag the node unhealthy.
 * Mon Dec 13 2010 : Version 1.2.15
  - Add two new debugging commands "ctdb readkey/writekey"
  - idtree overflow bugfix


-- 
CTDB repository


More information about the samba-cvs mailing list