[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Tue Jun 30 23:20:03 MDT 2015


The branch, master has been updated
       via  6c4e3cf ctdb-packaging: Package private libraries
       via  ba77907 ctdb-build: Fix ctdb --with-socketpath configure option
       via  94285d9 ctdb-packaging: Pass extra arguments to rpmbuild from commandline
       via  1e13455 ctdb-build: Fix building of PCP PMDA module
       via  0c609c9 ctdb-scripts: Only write to /proc route flush files if they exist
       via  eb159f3 ctdb-daemon: Promote debug messages about --start-as-* to NOTICE level
       via  b234ae0 ctdb-recoverd: Clear IP assignment tree on election loss
       via  036c2a9 ctdb-recoverd: Add new function clear_ip_assignment_tree()
       via  27674c4 ctdb-scripts: Create the directory containing the recovery lock
       via  f4871b8 ctdb-tests: Run transaction tests with externally imposed timeout
      from  e1a87d8 libldap: Fix CID 1308982 Unchecked return value from library

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6c4e3cf1a9f79eb4c521e1049f5c625b60453a33
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Thu Jun 25 14:55:23 2015 +1000

    ctdb-packaging: Package private libraries
    
    Remove the private libraries from builtin_libraries and package them
    instead.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Wed Jul  1 07:19:43 CEST 2015 on sn-devel-104

commit ba7790720d14fd8c50d1a08e356bcad633ef8594
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Sun Jun 21 20:53:29 2015 +0200

    ctdb-build: Fix ctdb --with-socketpath configure option
    
    Signed-off-by: Mathieu Parent <math.parent at gmail.com>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 94285d961f935692764a25ecb4f64503f1b291df
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Thu Jun 25 16:19:35 2015 +1000

    ctdb-packaging: Pass extra arguments to rpmbuild from commandline
    
    To build CTDB rpms with PCP PMDA, use
    
    make rpm RPM_OPTIONS="--with pmda"
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Pair-Programmed-With: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 1e13455d7e9d668b426427e8bdebc73328e50d92
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jun 25 15:06:27 2015 +1000

    ctdb-build: Fix building of PCP PMDA module
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 0c609c95051ff8c1e8fd61acc6abc7e4b4c4441b
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jun 24 21:06:22 2015 +1000

    ctdb-scripts: Only write to /proc route flush files if they exist
    
    On IPv4-only or IPv6-only systems one of these files will not exist.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit eb159f3ff530de8828631b04e17bf0990aed906e
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jun 17 15:05:30 2015 +1000

    ctdb-daemon: Promote debug messages about --start-as-* to NOTICE level
    
    It is important to know when ctdbd is started with --start-as-stopped
    or --start-as-disabled.  Given that this only happens once it makes
    sense to promote these debug items to NOTICE level.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit b234ae0a900052b03ca22efab8fa1b9e11f44ecc
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jun 11 15:49:25 2015 +1000

    ctdb-recoverd: Clear IP assignment tree on election loss
    
    If a node was previously recovery master (say, 20 years ago) and it
    becomes recovery master again then, if IP assignments have changed,
    verify_remote_ip_allocation() can produce messages like the following
    when called during recovery:
    
      ctdbd: recoverd:Inconsistent IP allocation - node 0 thinks 10.1.1.1 is held by node 0 while it is assigned to node 1
    
    When a node loses an election it should clear all data specific to it
    being the recovery master.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 036c2a92438585ab6b99a22fcf67b67890c525f0
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jun 11 15:46:27 2015 +1000

    ctdb-recoverd: Add new function clear_ip_assignment_tree()
    
    This needs to be cleared to avoid stale data when a new recovery
    master is elected.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 27674c413de5cadae633c834d4f2e41f26ab455e
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed May 20 04:19:09 2015 +1000

    ctdb-scripts: Create the directory containing the recovery lock
    
    This will handle the most obvious cases.  It won't handle the case
    where the directory is missing and the recovery lock location is
    updated at run-time.  However, this is a good improvement.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit f4871b8736f22941b227c19656319033c0c812e8
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Oct 8 12:22:06 2014 +1100

    ctdb-tests: Run transaction tests with externally imposed timeout
    
    This works around cases where ctdb_transaction gets stuck - this still
    needs to be debugged.  However, this change will at least cause
    individual tests to fail rather than having whole test runs time out.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

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

Summary of changes:
 ctdb/config/events.d/01.reclock                   |  5 +++++
 ctdb/config/functions                             | 11 +++++++++--
 ctdb/configure.rpm                                |  2 +-
 ctdb/include/ctdb_private.h                       |  3 ++-
 ctdb/packaging/RPM/ctdb.spec.in                   |  4 +++-
 ctdb/server/ctdb_daemon.c                         |  4 ++--
 ctdb/server/ctdb_recoverd.c                       |  2 ++
 ctdb/server/ctdb_takeover.c                       |  4 ++++
 ctdb/tests/eventscripts/etc-ctdb/rc.local         |  1 +
 ctdb/tests/simple/53_ctdb_transaction.sh          | 10 +++++++---
 ctdb/tests/simple/54_ctdb_transaction_recovery.sh | 12 +++++++++---
 ctdb/wscript                                      |  7 ++++---
 12 files changed, 49 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/config/events.d/01.reclock b/ctdb/config/events.d/01.reclock
index ed7afdd..d3dd612 100755
--- a/ctdb/config/events.d/01.reclock
+++ b/ctdb/config/events.d/01.reclock
@@ -10,6 +10,11 @@ loadconfig
 case "$1" in
     init)
 	ctdb_counter_init
+
+	if [ -n "$CTDB_RECOVERY_LOCK" ] ; then
+	    d=$(dirname "$CTDB_RECOVERY_LOCK")
+	    mkdir -vp "$d"
+	fi
 	;;
 
     monitor)
diff --git a/ctdb/config/functions b/ctdb/config/functions
index ec69583..bcef4c7 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -221,6 +221,13 @@ set_proc ()
     echo "$2" >"/proc/$1"
 }
 
+set_proc_maybe ()
+{
+    if [ -w "/proc/$1" ] ; then
+	set_proc "$1" "$2"
+    fi
+}
+
 ######################################################
 # wrapper around getting file contents from /proc/ to allow
 # this to be hooked for testing
@@ -977,8 +984,8 @@ drop_all_public_ips ()
 
 flush_route_cache ()
 {
-    set_proc sys/net/ipv4/route/flush 1
-    set_proc sys/net/ipv6/route/flush 1
+    set_proc_maybe sys/net/ipv4/route/flush 1
+    set_proc_maybe sys/net/ipv6/route/flush 1
 }
 
 ########################################################
diff --git a/ctdb/configure.rpm b/ctdb/configure.rpm
index ff7eace..32e6673 100755
--- a/ctdb/configure.rpm
+++ b/ctdb/configure.rpm
@@ -7,7 +7,7 @@ else
 fi
 
 CFLAGS="-Wall -g -D_GNU_SOURCE" ./configure \
-	--builtin-libraries=replace,popt,samba-debug,socket-blocking,tdb-wrap \
+	--builtin-libraries=replace,popt \
 	--bundled-libraries=!talloc,!tevent,!tdb \
 	--minimum-library-version=talloc:2.0.8,tdb:1.2.11,tevent:0.9.16 \
 	--prefix=/usr \
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index b177d6d..4413a32 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -1395,11 +1395,12 @@ int ctdb_recheck_persistent_health(struct ctdb_context *ctdb);
 
 void ctdb_run_notification_script(struct ctdb_context *ctdb, const char *event);
 
-int verify_remote_ip_allocation(struct ctdb_context *ctdb, 
+int verify_remote_ip_allocation(struct ctdb_context *ctdb,
 				struct ctdb_all_public_ips *ips,
 				uint32_t pnn);
 int update_ip_assignment_tree(struct ctdb_context *ctdb,
 				struct ctdb_public_ip *ip);
+void clear_ip_assignment_tree(struct ctdb_context *ctdb);
 
 int ctdb_init_tevent_logging(struct ctdb_context *ctdb);
 
diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in
index 98dd302..ce7d8a6 100644
--- a/ctdb/packaging/RPM/ctdb.spec.in
+++ b/ctdb/packaging/RPM/ctdb.spec.in
@@ -88,7 +88,7 @@ fi
 export CC
 
 CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./buildtools/bin/waf configure \
-	--builtin-libraries=replace,popt,samba-debug,socket-blocking,tdb-wrap \
+	--builtin-libraries=replace,popt \
 	--bundled-libraries=!talloc,!tevent,!tdb \
 	--minimum-library-version=talloc:%libtalloc_version,tdb:%libtdb_version,tevent:%libtevent_version \
 %if %with_pcp_pmda
@@ -199,6 +199,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/ltdbtool
 %{_bindir}/ctdb_diagnostics
 %{_bindir}/onnode
+%dir %{_libdir}
+%{_libdir}/ctdb/lib*
 %{_mandir}/man1/ctdb.1.gz
 %{_mandir}/man1/ctdbd.1.gz
 %{_mandir}/man1/ctdbd_wrapper.1.gz
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 331e726..955b92e 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1024,12 +1024,12 @@ static void initialise_node_flags (struct ctdb_context *ctdb)
 
 	/* do we start out in DISABLED mode? */
 	if (ctdb->start_as_disabled != 0) {
-		DEBUG(DEBUG_INFO, ("This node is configured to start in DISABLED state\n"));
+		DEBUG(DEBUG_NOTICE, ("This node is configured to start in DISABLED state\n"));
 		ctdb->nodes[ctdb->pnn]->flags |= NODE_FLAGS_DISABLED;
 	}
 	/* do we start out in STOPPED mode? */
 	if (ctdb->start_as_stopped != 0) {
-		DEBUG(DEBUG_INFO, ("This node is configured to start in STOPPED state\n"));
+		DEBUG(DEBUG_NOTICE, ("This node is configured to start in STOPPED state\n"));
 		ctdb->nodes[ctdb->pnn]->flags |= NODE_FLAGS_STOPPED;
 	}
 }
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 3a090b0..be53de6 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -2682,6 +2682,8 @@ static void election_handler(struct ctdb_context *ctdb, uint64_t srvid,
 		unban_all_nodes(ctdb);
 	}
 
+	clear_ip_assignment_tree(ctdb);
+
 	/* ok, let that guy become recmaster then */
 	ret = ctdb_ctrl_setrecmaster(ctdb, CONTROL_TIMEOUT(), ctdb_get_pnn(ctdb), em->pnn);
 	if (ret != 0) {
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 510c883..d5d2b39 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -4262,6 +4262,10 @@ int update_ip_assignment_tree(struct ctdb_context *ctdb, struct ctdb_public_ip *
 	return 0;
 }
 
+void clear_ip_assignment_tree(struct ctdb_context *ctdb)
+{
+	TALLOC_FREE(ctdb->ip_tree);
+}
 
 struct ctdb_reloadips_handle {
 	struct ctdb_context *ctdb;
diff --git a/ctdb/tests/eventscripts/etc-ctdb/rc.local b/ctdb/tests/eventscripts/etc-ctdb/rc.local
index 0291e57..0932ab4 100755
--- a/ctdb/tests/eventscripts/etc-ctdb/rc.local
+++ b/ctdb/tests/eventscripts/etc-ctdb/rc.local
@@ -23,6 +23,7 @@ nice_service ()
 
 # Always succeeds
 set_proc () { : ; }
+set_proc_maybe () { : ; }
 
 get_proc ()
 {
diff --git a/ctdb/tests/simple/53_ctdb_transaction.sh b/ctdb/tests/simple/53_ctdb_transaction.sh
index be4a98e..aa9202f 100755
--- a/ctdb/tests/simple/53_ctdb_transaction.sh
+++ b/ctdb/tests/simple/53_ctdb_transaction.sh
@@ -33,11 +33,15 @@ cluster_is_healthy
 try_command_on_node 0 "$CTDB listnodes"
 num_nodes=$(echo "$out" | wc -l)
 
-if test "x${CTDB_TEST_TIMELIMIT}" == "x" ; then
-	CTDB_TEST_TIMELIMIT=30
+if [ -z "$CTDB_TEST_TIMELIMIT" ] ; then
+    CTDB_TEST_TIMELIMIT=30
 fi
 
-t="$CTDB_TEST_WRAPPER $VALGRIND ctdb_transaction --timelimit=${CTDB_TEST_TIMELIMIT}"
+# Add a timeout command to ensure this test completes if
+# ctdb_transaction gets stuck
+timeout_cmd="timeout $((CTDB_TEST_TIMELIMIT * 2))"
+
+t="$CTDB_TEST_WRAPPER $VALGRIND $timeout_cmd ctdb_transaction --timelimit=${CTDB_TEST_TIMELIMIT}"
 
 echo "Running ctdb_transaction on all $num_nodes nodes."
 try_command_on_node -v -p all "$t & $t"
diff --git a/ctdb/tests/simple/54_ctdb_transaction_recovery.sh b/ctdb/tests/simple/54_ctdb_transaction_recovery.sh
index acd9224..78a6e99 100755
--- a/ctdb/tests/simple/54_ctdb_transaction_recovery.sh
+++ b/ctdb/tests/simple/54_ctdb_transaction_recovery.sh
@@ -52,11 +52,17 @@ cluster_is_healthy
 try_command_on_node 0 "$CTDB listnodes"
 num_nodes=$(echo "$out" | wc -l)
 
-if test "x${CTDB_TEST_TIMELIMIT}" == "x" ; then
-	CTDB_TEST_TIMELIMIT=30
+if [ -z "$CTDB_TEST_TIMELIMIT" ] ; then
+    CTDB_TEST_TIMELIMIT=30
 fi
 
-t="$CTDB_TEST_WRAPPER $VALGRIND ctdb_transaction --timelimit=${CTDB_TEST_TIMELIMIT}"
+# Add a timeout command to ensure this test completes if
+# ctdb_transaction gets stuck.  This one can get more "stuck" than the
+# previous test because a recovery can stop it committing a
+# transaction.
+timeout_cmd="timeout 600"
+
+t="$CTDB_TEST_WRAPPER $VALGRIND $timeout_cmd ctdb_transaction --timelimit=${CTDB_TEST_TIMELIMIT}"
 
 echo "Starting recovery loop"
 recovery_loop_start
diff --git a/ctdb/wscript b/ctdb/wscript
index 9561750..add10ec 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -60,7 +60,7 @@ def set_options(opt):
                    action="store", dest='ctdb_logdir', default=None)
     opt.add_option('--with-socketpath',
                    help=("path to CTDB daemon socket"),
-                   action="store_true", dest='ctdb_sockpath', default=False)
+                   action="store", dest='ctdb_sockpath', default=None)
 
 
 def configure(conf):
@@ -420,7 +420,7 @@ def build(bld):
                          source='utils/pmda/pmda_ctdb.c',
                          includes='include include/internal',
                          deps='''ctdb-client ctdb-common ctdb-system
-                                 pcp_pmda pcp''',
+                                 ctdb-common-util pcp_pmda pcp''',
                          install_path='${CTDB_PMDADIR}')
         bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/Install',
                           destname='Install')
@@ -712,7 +712,8 @@ def dist():
 
 
 def rpmonly(ctx):
-    cmd = 'rpmbuild -ta --clean --rmsource ctdb-%s.tar.gz' % VERSION
+    opts = os.getenv('RPM_OPTIONS') or ''
+    cmd = 'rpmbuild -ta --clean --rmsource %s ctdb-%s.tar.gz' % (opts, VERSION)
     ret = samba_utils.RUN_COMMAND(cmd)
     if ret != 0:
         print('rpmbuild exited with exit status %d' % ret)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list