[SCM] CTDB repository - branch master updated - ctdb-1.11-71-g137299f

Ronnie Sahlberg sahlberg at samba.org
Wed Oct 12 03:10:03 MDT 2011


The branch, master has been updated
       via  137299fadd0537612701c5902517857028236ed7 (commit)
       via  f4d5a5810f1a840a41c3541a3b822fce44d41e9a (commit)
       via  dd9e508c947613cc7a5046a35c80fbeced408803 (commit)
       via  8b9ac5cd8d867ff4866ac464c570d9293d03a91e (commit)
       via  e646142f4d28b5401235cd5edee325f7a29f8193 (commit)
       via  29474420606e802c83b53ef5f8e372c8eeac83c1 (commit)
      from  b82524f240bf21769dd7624ca6026763d38b9396 (commit)

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


- Log -----------------------------------------------------------------
commit 137299fadd0537612701c5902517857028236ed7
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Oct 12 20:11:28 2011 +1100

    Merge branches 'master' and 'master' of 10.1.1.27:/shared/ctdb/ctdb-master

commit f4d5a5810f1a840a41c3541a3b822fce44d41e9a
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Wed Sep 21 21:49:34 2011 +0200

    Fix bashism in 40.fs_use
    
    Also, add -P to df, to avoid multiline on Linux when device name is long (this is the case with LVM)

commit dd9e508c947613cc7a5046a35c80fbeced408803
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Tue Jul 26 00:08:59 2011 +0200

    Typo deamon -> daemon
    
    Thanks to lintian

commit 8b9ac5cd8d867ff4866ac464c570d9293d03a91e
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Mon Jul 25 23:35:49 2011 +0200

    apache's service name is not always httpd
    
    Solution 2 of <https://bugzilla.samba.org/show_bug.cgi?id=8317>

commit e646142f4d28b5401235cd5edee325f7a29f8193
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Sat Mar 26 21:32:34 2011 +0100

    Less verbosity when there is no public addresses file
    
    This partialy reverts 81eff51, but still avoid spam.

commit 29474420606e802c83b53ef5f8e372c8eeac83c1
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Wed Mar 23 22:20:15 2011 +0100

    Fix broken readdir
    
    Submited by Lorenzo De Liso on <http://bugs.debian.org/603155>
    (originaly named 99-fix-broken-readdir-test.diff). Also reported as
    <https://bugzilla.samba.org/show_bug.cgi?id=7032>.

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

Summary of changes:
 config/events.d/10.interface |    3 +++
 config/events.d/40.fs_use    |   13 ++++++-------
 config/functions             |    1 +
 lib/replace/repdir.m4        |    6 +++---
 tests/src/ctdb_fetch_one.c   |    2 +-
 5 files changed, 14 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index 356ee08..dd54f1e 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -13,6 +13,9 @@ loadconfig
 }
 
 [ ! -f "$CTDB_PUBLIC_ADDRESSES" ] && {
+	if [ "$1" = "init" ]; then
+		echo "No public addresses file found. Nothing to do for 10.interfaces"
+	fi
 	exit 0
 }
 
diff --git a/config/events.d/40.fs_use b/config/events.d/40.fs_use
index 14d33fa..abbc17e 100644
--- a/config/events.d/40.fs_use
+++ b/config/events.d/40.fs_use
@@ -11,9 +11,8 @@ case "$1" in
         for fs in $CTDB_CHECK_FS_USE
         do
             # parse fs_mount and fs_threshold
-            fs_config=(`echo $fs | tr ':' '\n'`)
-            fs_mount=${fs_config[0])}
-            fs_threshold=${fs_config[1])}
+            fs_mount=`echo "$fs" | awk -F : '{print $1}'`
+            fs_threshold=`echo "$fs" | awk -F : '{print $2}'`
 
             # check if given fs_mount is existing directory
             if [ ! -d "$fs_mount" ]; then
@@ -22,22 +21,22 @@ case "$1" in
             fi
 
             # check if given fs_threshold is number
-            if ! [[ "$fs_threshold" =~ ^[0-9]+$ ]] ; then
+            if ! (echo "$fs_threshold" | egrep -q '^[0-9]+$')  ; then
                 echo "$0: Threshold $fs_threshold is invalid number"
                 exit 1
             fi
 
             # get utilization of given fs from df
-            fs_usage=`df -k $fs_mount | grep % | awk {'print $5'} | sed 's/%//g' | tail -n 1`
+            fs_usage=`df -kP $fs_mount | grep '%' | awk {'print $5'} | sed 's/%//g' | tail -n 1`
 
             # check if fs_usage is number
-            if ! [[ "$fs_usage" =~ ^[0-9]+$ ]] ; then
+            if ! (echo "$fs_usage" | egrep -q '^[0-9]+$') ; then
                 echo "$0: FS utilization $fs_usage is invalid number"
                 exit 1
             fi
 
             # check if fs_usage is higher than or equal to fs_threshold
-            if [[ "$fs_usage" -ge "$fs_threshold" ]] ; then
+            if [ "$fs_usage" -ge "$fs_threshold" ] ; then
                 echo "ERROR: Utilization of $fs_mount ($fs_usage%) is higher than threshold ($fs_threshold%)"
                 exit 1
             fi
diff --git a/config/functions b/config/functions
index 5ca7d8e..c1891ba 100755
--- a/config/functions
+++ b/config/functions
@@ -1181,6 +1181,7 @@ is_ctdb_managed_service ()
     ctdb_compat_managed_service "$CTDB_MANAGES_SAMBA"    "samba"
     ctdb_compat_managed_service "$CTDB_MANAGES_SCP"      "scp"
     ctdb_compat_managed_service "$CTDB_MANAGES_WINBIND"  "winbind"
+    ctdb_compat_managed_service "$CTDB_MANAGES_HTTPD"    "apache2"
     ctdb_compat_managed_service "$CTDB_MANAGES_HTTPD"    "httpd"
     ctdb_compat_managed_service "$CTDB_MANAGES_ISCSI"    "iscsi"
     ctdb_compat_managed_service "$CTDB_MANAGES_CLAMD"    "clamd"
diff --git a/lib/replace/repdir.m4 b/lib/replace/repdir.m4
index f53a4c2..bbd111f 100644
--- a/lib/replace/repdir.m4
+++ b/lib/replace/repdir.m4
@@ -1,7 +1,7 @@
 AC_CACHE_CHECK([for broken readdir],libreplace_cv_READDIR_NEEDED,[
 	AC_TRY_RUN([
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"],
+#include "$libreplacedir/tests/os2_delete.c"],
 	[libreplace_cv_READDIR_NEEDED=no],
 	[libreplace_cv_READDIR_NEEDED=yes],
 	[libreplace_cv_READDIR_NEEDED="assuming not"])
@@ -34,7 +34,7 @@ AC_CACHE_CHECK([for replacing readdir using getdirentries()],libreplace_cv_READD
 #define _LIBREPLACE_REPLACE_H
 #include "$libreplacedir/repdir_getdirentries.c"
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"],
+#include "$libreplacedir/tests/os2_delete.c"],
 	[libreplace_cv_READDIR_GETDIRENTRIES=yes],
 	[libreplace_cv_READDIR_GETDIRENTRIES=no])
 ])
@@ -57,7 +57,7 @@ AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_cv_READDIR_GE
 #error _donot_use_getdents_replacement_anymore
 #include "$libreplacedir/repdir_getdents.c"
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"],
+#include "$libreplacedir/tests/os2_delete.c"],
 	[libreplace_cv_READDIR_GETDENTS=yes],
 	[libreplace_cv_READDIR_GETDENTS=no])
 ])
diff --git a/tests/src/ctdb_fetch_one.c b/tests/src/ctdb_fetch_one.c
index 042e605..a1529bc 100644
--- a/tests/src/ctdb_fetch_one.c
+++ b/tests/src/ctdb_fetch_one.c
@@ -117,7 +117,7 @@ int main(int argc, const char *argv[])
 	ctdb = ctdb_cmdline_client(ev, timeval_current_ofs(3, 0));
 
 	if (ctdb == NULL) {
-		printf("failed to connect to ctdb deamon.\n");
+		printf("failed to connect to ctdb daemon.\n");
 		exit(1);
 	}
 


-- 
CTDB repository


More information about the samba-cvs mailing list