From 51ec7c2845e1aa8f6e968557011cc42ddd869854 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Mon, 10 Oct 2016 17:09:01 -0700 Subject: [PATCH] retry salt-call in configure-vm.sh --- cluster/gce/configure-vm.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 4da8e543242..44a56f2ab78 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -1025,7 +1025,15 @@ function configure-salt() { function run-salt() { echo "== Calling Salt ==" - salt-call --local state.highstate || true + local rc=0 + for i in {0..6}; do + salt-call --local state.highstate && rc=0 || rc=$? + if [[ "${rc}" == 0 ]]; then + return 0 + fi + done + echo "Salt failed to run repeatedly" >&2 + return "${rc}" } function run-user-script() {