summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@ronnie>2007-05-06 06:06:39 +1000
committerRonnie Sahlberg <sahlberg@ronnie>2007-05-06 06:06:39 +1000
commit60d4b0e8b4b2164ac2fb1d97cf8023aab22fca55 (patch)
tree9e9f9e647e3f6460d314482f50a9afd4f899281f
parent7bbcc964f25ef469942c59428893a1ec4f3df1be (diff)
downloadsamba-60d4b0e8b4b2164ac2fb1d97cf8023aab22fca55.tar.gz
samba-60d4b0e8b4b2164ac2fb1d97cf8023aab22fca55.tar.xz
samba-60d4b0e8b4b2164ac2fb1d97cf8023aab22fca55.zip
in the recover test
start the daemons with explicit socketnames and explicit ip address/port remove all --socket= from all ctdb_control calls since they are not needed anymore (This used to be ctdb commit 593a959d428f5b4a913117a9b5c8fe65a3eb950e)
-rwxr-xr-xctdb/tests/recover.sh72
1 files changed, 36 insertions, 36 deletions
diff --git a/ctdb/tests/recover.sh b/ctdb/tests/recover.sh
index 09d35114c0..dbc0421fbb 100755
--- a/ctdb/tests/recover.sh
+++ b/ctdb/tests/recover.sh
@@ -4,20 +4,20 @@ killall -q ctdbd
echo "Starting 4 ctdb daemons"
bin/ctdbd --nlist direct/4nodes.txt
-bin/ctdbd --nlist direct/4nodes.txt
-bin/ctdbd --nlist direct/4nodes.txt
-bin/ctdbd --nlist direct/4nodes.txt
+bin/ctdbd --nlist direct/4nodes.txt --listen=127.0.0.2:9001 --socket=/tmp/ctdb.socket.127.0.0.2
+bin/ctdbd --nlist direct/4nodes.txt --listen=127.0.0.3:9001 --socket=/tmp/ctdb.socket.127.0.0.3
+bin/ctdbd --nlist direct/4nodes.txt --listen=127.0.0.4:9001 --socket=/tmp/ctdb.socket.127.0.0.4
echo "Attaching to some databases"
-bin/ctdb_control --socket=/tmp/ctdb.socket attach test1.tdb || exit 1
-bin/ctdb_control --socket=/tmp/ctdb.socket attach test2.tdb || exit 1
-bin/ctdb_control --socket=/tmp/ctdb.socket attach test3.tdb || exit 1
-bin/ctdb_control --socket=/tmp/ctdb.socket attach test4.tdb || exit 1
+bin/ctdb_control attach test1.tdb || exit 1
+bin/ctdb_control attach test2.tdb || exit 1
+bin/ctdb_control attach test3.tdb || exit 1
+bin/ctdb_control attach test4.tdb || exit 1
echo "Clearing all databases to make sure they are all empty"
-bin/ctdb_control --socket=/tmp/ctdb.socket getdbmap 0 | egrep "^dbid:" | sed -e "s/^dbid://" -e "s/ .*$//" | while read DB; do
+bin/ctdb_control getdbmap 0 | egrep "^dbid:" | sed -e "s/^dbid://" -e "s/ .*$//" | while read DB; do
seq 0 3 | while read NODE; do
- bin/ctdb_control --socket=/tmp/ctdb.socket cleardb $NODE $DB
+ bin/ctdb_control cleardb $NODE $DB
done
done
@@ -26,51 +26,51 @@ echo
echo
echo "Printing all databases on all nodes. they should all be empty"
echo "============================================================="
-bin/ctdb_control --socket=/tmp/ctdb.socket getdbmap 0 | egrep "^dbid:" | sed -e "s/^.*name://" -e "s/ .*$//" | while read DBNAME; do
+bin/ctdb_control getdbmap 0 | egrep "^dbid:" | sed -e "s/^.*name://" -e "s/ .*$//" | while read DBNAME; do
seq 0 3 | while read NODE; do
echo "Content of DBNAME:$DBNAME NODE:$NODE :"
- bin/ctdb_control --socket=/tmp/ctdb.socket catdb $DBNAME $NODE
+ bin/ctdb_control catdb $DBNAME $NODE
done
done
echo
echo
echo "Populating the databases"
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 0 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket setdmaster 0 0x220c2a7b 1
+./bin/ctdb_control writerecord 0 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control setdmaster 0 0x220c2a7b 1
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 1 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 1 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket setdmaster 1 0x220c2a7b 2
+./bin/ctdb_control writerecord 1 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control writerecord 1 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control setdmaster 1 0x220c2a7b 2
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 2 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 2 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 2 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket setdmaster 2 0x220c2a7b 3
+./bin/ctdb_control writerecord 2 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control writerecord 2 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control writerecord 2 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control setdmaster 2 0x220c2a7b 3
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control --socket=/tmp/ctdb.socket setdmaster 3 0x220c2a7b 3
+./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
+./bin/ctdb_control setdmaster 3 0x220c2a7b 3
echo
echo
echo "Printing all databases on all nodes. there should be a record there"
echo "============================================================="
-bin/ctdb_control --socket=/tmp/ctdb.socket getdbmap 0 | egrep "^dbid:" | sed -e "s/^.*name://" -e "s/ .*$//" | while read DBNAME; do
+bin/ctdb_control getdbmap 0 | egrep "^dbid:" | sed -e "s/^.*name://" -e "s/ .*$//" | while read DBNAME; do
seq 0 3 | while read NODE; do
echo "Content of DBNAME:$DBNAME NODE:$NODE :"
- bin/ctdb_control --socket=/tmp/ctdb.socket catdb $DBNAME $NODE
+ bin/ctdb_control catdb $DBNAME $NODE
done
done
echo
echo
-echo "killing off node #0"
+echo "killing off node #2"
echo "==================="
-CTDBPID=`./bin/ctdb_control getpid 0 | sed -e "s/Pid://"`
+CTDBPID=`./bin/ctdb_control getpid 2 | sed -e "s/Pid://"`
kill $CTDBPID
sleep 1
@@ -78,7 +78,7 @@ echo
echo
echo "Recovery the cluster"
echo "===================="
-./bin/ctdb_control --socket=/tmp/ctdb.socket recover 2 0x220c2a7b
+./bin/ctdb_control recover 0 0x220c2a7b
echo
echo
@@ -86,19 +86,19 @@ 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 "================================================="
+echo "Node 0:"
+bin/ctdb_control catdb test4.tdb 0
echo "Node 1:"
-bin/ctdb_control --socket=/tmp/ctdb.socket catdb test4.tdb 1
-echo "Node 2:"
-bin/ctdb_control --socket=/tmp/ctdb.socket catdb test4.tdb 2
+bin/ctdb_control catdb test4.tdb 1
echo "Node 3:"
-bin/ctdb_control --socket=/tmp/ctdb.socket catdb test4.tdb 3
+bin/ctdb_control catdb test4.tdb 3
echo "nodemap:"
-bin/ctdb_control --socket=/tmp/ctdb.socket getnodemap 3
+bin/ctdb_control getnodemap 0
echo
echo
echo "Traverse the cluster and dump the database"
-bin/ctdb_control --socket=/tmp/ctdb.socket catdb test4.tdb
+bin/ctdb_control catdb test4.tdb
#leave the ctdb daemons running so one can look at the box in more detail