From: Michael Polenchuk Date: Thu, 24 Aug 2017 06:07:24 +0000 (+0000) Subject: Merge "MaaS: commissioning/deployment retry" X-Git-Tag: opnfv-5.0.RC1~114 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=0f3fc04189db6156dd3a6d85c834f94b1d0c69aa;p=fuel.git Merge "MaaS: commissioning/deployment retry" --- 0f3fc04189db6156dd3a6d85c834f94b1d0c69aa diff --cc mcp/config/states/maas index 01d247ea3,436c2ff3b..31625d827 --- a/mcp/config/states/maas +++ b/mcp/config/states/maas @@@ -1,16 -1,12 +1,14 @@@ #!/bin/bash +set -x + function wait_for() { + local total_attempts=$1; shift local cmdstr=$@ - local total_attempts=360 local sleep_time=10 - local attempt=1 echo "[NOTE] Waiting for cmd to return success: ${cmdstr}" - while ((attempt <= total_attempts)); do + for attempt in $(seq "${total_attempts}"); do eval "${cmdstr}" && break || true echo -n '.'; sleep "${sleep_time}" - ((attempt+=1)) done }