mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
ctdb-tests: Add some options to setup_ctdb()
These provide special-purpose setups for particular testcases. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
7e08c1d24c
commit
bdfc8b7e3e
@ -134,6 +134,13 @@ setup_public_addresses ()
|
||||
|
||||
setup_ctdb ()
|
||||
{
|
||||
local no_public_addresses=false
|
||||
local no_event_scripts=false
|
||||
case "$1" in
|
||||
--no-public-addresses) no_public_addresses=true ;;
|
||||
--no-event-scripts) no_event_scripts=true ;;
|
||||
esac
|
||||
|
||||
setup_nodes >"$CTDB_NODES" || return 1
|
||||
|
||||
# If there are (strictly) greater than 2 nodes then we'll
|
||||
@ -159,7 +166,7 @@ setup_ctdb ()
|
||||
|
||||
local public_addresses="${node_dir}/public_addresses"
|
||||
|
||||
if [ $pnn_no_ips -eq $pnn ] ; then
|
||||
if $no_public_addresses || [ $pnn_no_ips -eq $pnn ] ; then
|
||||
echo "Node ${pnn} will have no public IPs."
|
||||
: >"$public_addresses"
|
||||
else
|
||||
@ -173,6 +180,10 @@ setup_ctdb ()
|
||||
local db_dir="${node_dir}/db"
|
||||
mkdir -p "${db_dir}/persistent"
|
||||
|
||||
if $no_event_scripts ; then
|
||||
rm -vf "${CTDB_BASE}/events.d/"*
|
||||
fi
|
||||
|
||||
cat >"$conf" <<EOF
|
||||
CTDB_RECOVERY_LOCK="${SIMPLE_TESTS_VAR_DIR}/rec.lock"
|
||||
CTDB_NODES="$CTDB_NODES"
|
||||
|
Loading…
x
Reference in New Issue
Block a user