From: Ronnie Sahlberg Date: Wed, 2 May 2007 11:31:20 +0000 (+1000) Subject: do a real recovery by killing a node and then calling the recover X-Git-Tag: tevent-0.9.20~348^2~2794^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe24692d46ebc740b679b048601383f5250aadba;p=thirdparty%2Fsamba.git do a real recovery by killing a node and then calling the recover control (This used to be ctdb commit f8d97f8b56f0af83a514ec0364eb915e2d5ea2d7) --- diff --git a/ctdb/tests/recover.sh b/ctdb/tests/recover.sh index cd72440fbed..79fe70f2a4b 100755 --- a/ctdb/tests/recover.sh +++ b/ctdb/tests/recover.sh @@ -67,11 +67,19 @@ bin/ctdb_control --socket=/tmp/ctdb.socket getdbmap 0 | egrep "^dbid:" | sed -e done done +echo +echo +echo "killing off node #0" +echo "===================" +CTDBPID=`ps aux | grep ctdbd | grep -v grep | head -1 | sed -e "s/^[^ ]* *//" -e "s/ .*$//"` +kill $CTDBPID +sleep 1 + echo echo echo "Recovery the cluster" echo "====================" -./bin/ctdb_control --socket=/tmp/ctdb.socket recover 0 0x220c2a7b +./bin/ctdb_control --socket=/tmp/ctdb.socket recover 2 0x220c2a7b echo echo @@ -79,13 +87,16 @@ echo "Printing all databases on all nodes." echo "The databases should be the same now on all nodes" echo "and the record will have been migrated to node 0" echo "=================================================" -bin/ctdb_control --socket=/tmp/ctdb.socket getdbmap 0 | egrep "^dbid:" | sed -e "s/^dbid://" -e "s/ .*$//" | while read DB; do - seq 0 3 | while read NODE; do - echo "Content of DB:$DB NODE:$NODE :" - bin/ctdb_control --socket=/tmp/ctdb.socket catdb $NODE $DB - done -done +echo "Node 1:" +bin/ctdb_control --socket=/tmp/ctdb.socket catdb 1 0x220c2a7b +echo "Node 2:" +bin/ctdb_control --socket=/tmp/ctdb.socket catdb 2 0x220c2a7b +echo "Node 3:" +bin/ctdb_control --socket=/tmp/ctdb.socket catdb 3 0x220c2a7b +echo "nodemap:" +bin/ctdb_control --socket=/tmp/ctdb.socket getnodemap 3 + -#leave the ctdb daemons running +#leave the ctdb daemons running so one can look at the box in more detail #killall -q ctdbd