From c8acb37b14e867e8ce053539efe189b15b18abf6 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 25 Nov 2021 11:16:13 +0100 Subject: [PATCH] Fix a bug in deploy_garage --- README.md | 1 + instrumented/deploy_garage.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce00677..014d2c4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ python3 main.py ## Example ```bash +sudo rm -rf /tmp/garage-testnet/ # always start by deleting previous run sudo python3 main.py create ./config.yml sudo python3 main.py run-all example/deploy_garage.sh sudo python3 main.py run dc1:dc1s1 garage -c /tmp/garage-testnet/dc1/dc1s1/garage.toml status diff --git a/instrumented/deploy_garage.sh b/instrumented/deploy_garage.sh index e91b387..14f36a6 100755 --- a/instrumented/deploy_garage.sh +++ b/instrumented/deploy_garage.sh @@ -46,11 +46,14 @@ EOF RUST_LOG=garage=debug ${GARAGE_PATH} server 2>> ${NODE_STORAGE_PATH}/logs & disown sleep 2 -CONFIG_NODE_FPATH=(${STORAGE_PATH}/*{,/*}/garage.toml) +CONFIG_NODE_FPATH=($(find /tmp/garage-testnet/ -maxdepth 3 -name garage.toml)) SELF_ID=$(${GARAGE_PATH} node id 2>/dev/null) SHORT_ID=$(echo ${SELF_ID} | cut -c-64) +echo ===DEBUG=== +echo $CONFIG_NODE_FPATH +echo ${CONFIG_NODE_FPATH[0]} ${GARAGE_PATH} -c ${CONFIG_NODE_FPATH[0]} node connect ${SELF_ID} ${GARAGE_PATH} -c ${CONFIG_NODE_FPATH[0]} layout assign ${SHORT_ID} -z ${ZONE:-unzonned-${HOST}} -c 1 -t ${HOST}