From 0df7c1cec5894522fc0f132b271a8c2132279c52 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Mon, 24 Apr 2023 12:57:25 -0500 Subject: [PATCH] try to fix bootstrap timing issues --- terraform/scripts/initialize-controlplane.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terraform/scripts/initialize-controlplane.sh b/terraform/scripts/initialize-controlplane.sh index 47e9dff..08d4836 100644 --- a/terraform/scripts/initialize-controlplane.sh +++ b/terraform/scripts/initialize-controlplane.sh @@ -383,10 +383,11 @@ else done echo ">> Continuing after $((attempt*10)) seconds." echo ">> Retrieving cluster discovery config..." + sleep 2 attempts_max=6 attempt=0 until [ -f ~/discovery.yaml ] || [ ${attempt} -eq ${attempts_max} ]; do - wget "http://${K8S_CONTROLPLANE_VIP}:8000/discovery.yaml" + curl -o discovery.yaml --fail "http://${K8S_CONTROLPLANE_VIP}:8000/discovery.yaml" 2>/dev/null sleep 2 if ! [ -f ~/discovery.yaml ]; then echo ">> Unable to retrieve config..."