[SCM] CTDB repository - branch master updated - 008533d971aec9c28c6e4750ef4677dd943633ff

Andrew Tridgell tridge at samba.org
Wed Jul 30 03:21:46 GMT 2008


The branch, master has been updated
       via  008533d971aec9c28c6e4750ef4677dd943633ff (commit)
       via  d3f5d75665a78ae0081fda57e58384b27a6ae396 (commit)
       via  22f737be0e70fc043affaa4f953f60d852b7999a (commit)
       via  ded1a974cdd86b436c6e5cba27069d1a3796dbe9 (commit)
       via  795c190b004d404b84dda053593139ed51d345e5 (commit)
      from  b1fed105ad780e89a128a611ef0bd659818eeebf (commit)

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


- Log -----------------------------------------------------------------
commit 008533d971aec9c28c6e4750ef4677dd943633ff
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Jul 30 13:21:02 2008 +1000

    cleanup on SIGINT

commit d3f5d75665a78ae0081fda57e58384b27a6ae396
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Jul 30 13:20:47 2008 +1000

    - cleanup persistent db at start
    - catch SIGINT and kill daemons

commit 22f737be0e70fc043affaa4f953f60d852b7999a
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Jul 30 13:20:24 2008 +1000

    - show pids during test
    - don't use first_time, as it is not safe for multiple
      clients on a node

commit ded1a974cdd86b436c6e5cba27069d1a3796dbe9
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jul 28 17:11:15 2008 +1000

    new version 1.0.51

commit 795c190b004d404b84dda053593139ed51d345e5
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jul 28 17:07:44 2008 +1000

    From Alexander Saupp.
    If we use vlan tagging and bonding we must strip the vlan part off the name
    so we can check the main bonde device for status.
    
    I.e. check bond0  instead of bond0.<VLANTAG>

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

Summary of changes:
 config/events.d/10.interface |    1 +
 packaging/RPM/ctdb.spec      |    9 ++++++++-
 tests/ctdb_persistent.c      |   13 +++++--------
 tests/fetch.sh               |    2 ++
 tests/persistent.sh          |    8 +++++++-
 tests/run_tests.sh           |    2 ++
 6 files changed, 25 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index 8283a3f..15e5561 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -147,6 +147,7 @@ case $cmd in
 	for IFACE in $INTERFACES ; do
 	    case $IFACE in 
 	    bond*)
+		IFACE=`echo $IFACE |sed -e 's/\....$//'`
 		grep '^MII Status: up' /proc/net/bonding/$IFACE > /dev/null || {
 			echo "ERROR: public network interface $IFACE is down"
 			exit 1
diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 1ac4129..bff072b 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: 50
+Release: 51
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -118,6 +118,13 @@ fi
 %{_includedir}/ctdb_private.h
 
 %changelog
+* Mon Jul 28 2008 : Version 1.0.51
+ - Strip off the vlan tag from bond devices before we check in /proc
+   if the interface is up or not.
+ - Use testparm in the background in the scripts to allow probing
+   that the shares do exist.
+ - Fix a bug in the logging code to handle multiline entries better
+ - Rename private elements from private to private_data
 * Fri Jul 18 2008 : Version 1.0.50
  - Dont assume that just because we can establish a TCP connection
    that we are actually talking to a functioning ctdb daemon.
diff --git a/tests/ctdb_persistent.c b/tests/ctdb_persistent.c
index 7bd4ab8..c95ab93 100644
--- a/tests/ctdb_persistent.c
+++ b/tests/ctdb_persistent.c
@@ -57,7 +57,7 @@ static void each_second(struct event_context *ev, struct timed_event *te,
 	uint32_t *old_counters;
 
 
-	printf("Counters: ");
+	printf("[%4u] Counters: ", getpid());
 	old_counters = (uint32_t *)old_data.dptr;
 	for (i=0;i<old_data.dsize/sizeof(uint32_t); i++) {
 		printf("%6u ", old_counters[i]);
@@ -78,7 +78,8 @@ static void check_counters(struct ctdb_context *ctdb, TDB_DATA data)
 	/* check that all the counters are monotonic increasing */
 	for (i=0; i<old_data.dsize/sizeof(uint32_t); i++) {
 		if (counters[i]<old_counters[i]) {
-			printf("ERROR: counters has decreased for node %u  From %u to %u\n", i, old_counters[i], counters[i]);
+			printf("[%4u] ERROR: counters has decreased for node %u  From %u to %u\n", 
+			       getpid(), i, old_counters[i], counters[i]);
 			success = false;
 		}
 	}
@@ -101,7 +102,6 @@ static void test_store_records(struct ctdb_context *ctdb, struct event_context *
 	int ret;
 	struct ctdb_record_handle *h;
 	uint32_t *counters;
-	int first_time = true;	
 	ctdb_db = ctdb_db_handle(ctdb, "persistent.tdb");
 
 	key.dptr = discard_const("testkey");
@@ -135,11 +135,6 @@ static void test_store_records(struct ctdb_context *ctdb, struct event_context *
 
 		counters = (uint32_t *)data.dptr;
 
-		if (first_time) {
-			counters[pnn] = 0;
-			first_time = false;
-		}
-
 		/* bump our counter */
 		counters[pnn]++;
 
@@ -181,6 +176,8 @@ int main(int argc, const char *argv[])
 	poptContext pc;
 	struct event_context *ev;
 
+	setlinebuf(stdout);
+
 	pc = poptGetContext(argv[0], argc, argv, popt_options, POPT_CONTEXT_KEEP_FIRST);
 
 	while ((opt = poptGetNextOpt(pc)) != -1) {
diff --git a/tests/fetch.sh b/tests/fetch.sh
index f4c820a..a075321 100755
--- a/tests/fetch.sh
+++ b/tests/fetch.sh
@@ -5,6 +5,8 @@ if [ $# -gt 0 ]; then
     NUMNODES=$1
 fi
 
+trap 'echo "Killing test"; killall -9 -q ctdbd ctdb_fetch; exit 1' INT TERM
+
 tests/start_daemons.sh $NUMNODES || exit 1
 
 
diff --git a/tests/persistent.sh b/tests/persistent.sh
index 327f8bc..112e9fd 100755
--- a/tests/persistent.sh
+++ b/tests/persistent.sh
@@ -5,14 +5,19 @@ if [ $# -gt 0 ]; then
     NUMNODES=$1
 fi
 
+killall -9 -q ctdb_persistent ctdbd
+
+rm -rf test.db/persistent
 
 echo "Starting $NUMNODES daemons for SAFE persistent writes"
 tests/start_daemons.sh $NUMNODES || exit 1
 
-killall -9 -q ctdb_persistent
+trap 'echo "Killing test"; killall -9 -q ctdbd ctdb_persistent; exit 1' INT TERM
+
 
 for i in `seq 1 $NUMNODES`; do
   $VALGRIND bin/ctdb_persistent --timelimit 30 --socket sock.$i $* &
+  $VALGRIND bin/ctdb_persistent --timelimit 30 --socket sock.$i $* &
 done
 wait
 
@@ -29,6 +34,7 @@ killall -9 -q ctdb_persistent
 
 for i in `seq 1 $NUMNODES`; do
   $VALGRIND bin/ctdb_persistent --unsafe-writes --timelimit 30 --socket sock.$i $* &
+  $VALGRIND bin/ctdb_persistent --unsafe-writes --timelimit 30 --socket sock.$i $* &
 done
 wait
 
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 356a9b2..3e1caf4 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+trap 'echo "Killing test"; killall -9 -q ctdbd; exit 1' INT TERM
+
 tests/fetch.sh 4 || exit 1
 tests/bench.sh 4 || exit 1
 tests/ctdbd.sh || exit 1


-- 
CTDB repository


More information about the samba-cvs mailing list