summaryrefslogtreecommitdiffstats
path: root/wsrep-lib/wsrep-API/v26/examples/node/node.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:04:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:04:16 +0000
commita68fb2d8219f6bccc573009600e9f23e89226a5e (patch)
treed742d35d14ae816e99293d2b01face30e9f3a46b /wsrep-lib/wsrep-API/v26/examples/node/node.sh
parentInitial commit. (diff)
downloadmariadb-10.6-upstream.tar.xz
mariadb-10.6-upstream.zip
Adding upstream version 1:10.6.11.upstream/1%10.6.11upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wsrep-lib/wsrep-API/v26/examples/node/node.sh')
-rwxr-xr-xwsrep-lib/wsrep-API/v26/examples/node/node.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/wsrep-lib/wsrep-API/v26/examples/node/node.sh b/wsrep-lib/wsrep-API/v26/examples/node/node.sh
new file mode 100755
index 00000000..40e0a498
--- /dev/null
+++ b/wsrep-lib/wsrep-API/v26/examples/node/node.sh
@@ -0,0 +1,40 @@
+#!/bin/sh -eu
+
+NODE_ID=$1
+
+NODE_NAME=${NODE_NAME:-$NODE_ID}
+
+NODE_DIR=${NODE_DIR:-/tmp/node/$NODE_NAME}
+rm -rf $NODE_DIR/*
+mkdir -p $NODE_DIR
+
+NODE_OPT=${NODE_OPT:-}
+
+NODE_HOST=${NODE_HOST:-localhost}
+NODE_PORT=${NODE_PORT:-$((10000 + $NODE_ID))}
+
+NODE_CLIENTS=${NODE_CLIENTS:-1}
+NODE_APPLIERS=${NODE_APPLIERS:-1}
+
+NODE_ADDR=${NODE_ADDR:-}
+
+NODE_BIN=${NODE_BIN:-$(dirname $0)/node}
+
+# convert possible relative path to absolute path
+NODE_PROVIDER=$(realpath $NODE_PROVIDER)
+
+set -x
+
+$NODE_BIN \
+-v "$NODE_PROVIDER" \
+-n "$NODE_NAME" \
+-f "$NODE_DIR" \
+-o "$NODE_OPT" \
+-t "$NODE_HOST" \
+-p $NODE_PORT \
+-s $NODE_APPLIERS \
+-m $NODE_CLIENTS \
+-d 10 \
+-a "$NODE_ADDR"
+
+set +x