mirror of
https://github.com/samba-team/samba.git
synced 2025-11-12 04:23:49 +03:00
This doesn't get the ctdb code fully working in Samba4, it just gets it building and not breaking non-clustered use of Samba. It will take a bit longer to update some of the calling ctdb_cluster.c code to make it work correctly in Samba4. Note also that Samba4 now only links to the client portion of ctdb. For the moment I am leaving the ctdbd as a separate daemon, which you install separately from http://ctdb.samba.org/.
29 lines
642 B
Bash
Executable File
29 lines
642 B
Bash
Executable File
#!/bin/sh
|
|
|
|
NUMNODES="$1"
|
|
NODES=$2
|
|
shift
|
|
shift
|
|
|
|
killall -q ctdbd
|
|
|
|
CTDB_OPTIONS="--reclock=rec.lock --nlist $NODES --event-script=tests/events --logfile=- --dbdir=test.db $*"
|
|
if [ `id -u` -eq 0 ]; then
|
|
CTDB_OPTIONS="$CTDB_OPTIONS --public-addresses=tests/public_addresses --public-interface=lo"
|
|
fi
|
|
|
|
echo "Starting $NUMNODES ctdb daemons"
|
|
for i in `seq 1 $NUMNODES`; do
|
|
$VALGRIND bin/ctdbd --socket=sock.$i $CTDB_OPTIONS || exit 1
|
|
done
|
|
ln -sf $PWD/sock.1 /tmp/ctdb.socket || exit 1
|
|
|
|
while bin/ctdb status | grep RECOVERY > /dev/null; do
|
|
echo "`date` Waiting for recovery"
|
|
sleep 1;
|
|
done
|
|
|
|
echo "$NUMNODES daemons started"
|
|
|
|
exit 0
|