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
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
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"