diff options
Diffstat (limited to 'mcp/scripts')
-rw-r--r-- | mcp/scripts/lib.sh | 7 | ||||
-rwxr-xr-x | mcp/scripts/salt.sh | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 5b00c7380..8e9ba97a9 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -449,12 +449,11 @@ function wait_for { for attempt in $(seq "${total_attempts}"); do echo "[wait_for] Attempt ${attempt}/${total_attempts%.*} for: ${cmdstr}" if [ "${total_attempts%.*}" = "${total_attempts}" ]; then - # shellcheck disable=SC2015 eval "${cmdstr}" && echo "[wait_for] OK: ${cmdstr}" && return 0 || true else - ! (eval "${cmdstr}" || echo __fuel_wf_failure__) |& tee /dev/stderr | \ - grep -Eq '(Not connected|No response|__fuel_wf_failure__)' && \ - echo "[wait_for] OK: ${cmdstr}" && return 0 || true + ! (eval "${cmdstr}" || echo 'No response') |& tee /dev/stderr | \ + grep -Eq '(Not connected|No response)' && \ + echo "[wait_for] OK: ${cmdstr}" && return 0 || true fi sleep "${sleep_time}" done diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh index 15168c0cc..824cada7b 100755 --- a/mcp/scripts/salt.sh +++ b/mcp/scripts/salt.sh @@ -106,10 +106,10 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END wait_for 3.0 'salt -C "E@^(${NODE_MASK}|cfg01).*" state.apply salt' wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" state.sls linux.system,linux.storage' - salt -C "E@^(${NODE_MASK}).*" state.sls linux.network -b 1 || true + wait_for 2.0 'salt -C "E@^(${NODE_MASK}).*" state.sls linux.network' || true salt -C "E@^(${NODE_MASK}).*" system.reboot wait_for 90.0 'salt -C "E@^(${NODE_MASK}).*" test.ping' - wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" pkg.upgrade refresh=False' + wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" pkg.upgrade refresh=False dist_upgrade=True' wait_for 3.0 'salt -C "E@^(${NODE_MASK}|cfg01).*" state.sls ntp' |