From ae153f96192f6f549230ca8480278f8404f6d49c Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 15:25:42 +0100 Subject: [PATCH] retry waiting for deploment settings --- bedrock/scripts/run_logos_blockchain_node.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bedrock/scripts/run_logos_blockchain_node.sh b/bedrock/scripts/run_logos_blockchain_node.sh index be2f7976..cc5c11a2 100755 --- a/bedrock/scripts/run_logos_blockchain_node.sh +++ b/bedrock/scripts/run_logos_blockchain_node.sh @@ -11,7 +11,19 @@ export CFG_FILE_PATH="/config.yaml" \ /usr/bin/logos-blockchain-cfgsync-client -# Download deployment settings generated by cfgsync -curl -sf "${CFG_SERVER_ADDR}/deployment-settings" -o /deployment-settings.yaml +# Wait for deployment settings to be available (generated after all nodes register) +echo "Waiting for deployment settings from cfgsync..." +RETRIES=0 +MAX_RETRIES=60 +until curl -sf "${CFG_SERVER_ADDR}/deployment-settings" -o /deployment-settings.yaml; do + RETRIES=$((RETRIES + 1)) + if [ "$RETRIES" -ge "$MAX_RETRIES" ]; then + echo "Failed to download deployment settings after ${MAX_RETRIES} attempts" + exit 1 + fi + echo "Deployment settings not ready yet, retrying in 1s... (${RETRIES}/${MAX_RETRIES})" + sleep 1 +done +echo "Deployment settings downloaded successfully" exec /usr/bin/logos-blockchain-node /config.yaml --deployment /deployment-settings.yaml