diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-12-31 19:35:17 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-01-07 04:04:36 +0100 |
commit | 3f559299c232bbb7639d02243c95d6256cdf94d4 (patch) | |
tree | 57e4c95ba2c637bf139dcbc7be523b71756acf02 /mcp/config/states/baremetal_init | |
parent | fac41836e91dd56696c3a435bfdbc7adf53899e2 (diff) |
lib.sh: Extend wait_for function to catch no resp
wait_for function should be able to also check for minions that did
not return or not respond, in addition to the return code.
To keep it backwards compatible, condition the new check on the max
attempt number being specified in decimal format (e.g. '10.0' unlike
old '10').
Change-Id: If2512cf9121cdd795638efe7362ef0485d4e8d91
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/config/states/baremetal_init')
-rwxr-xr-x | mcp/config/states/baremetal_init | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init index eeb08187f..ef2f78b70 100755 --- a/mcp/config/states/baremetal_init +++ b/mcp/config/states/baremetal_init @@ -29,8 +29,7 @@ salt -C 'kvm* or cmp*' service.force_reload salt-minion salt -C 'cmp*' state.apply linux.system salt -C 'cmp*' state.apply linux.network || true salt -C 'kvm* or cmp*' system.reboot -wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ - "tee /dev/stderr | grep -Fq 'Not connected'" +wait_for 90.0 "salt -C 'kvm* or cmp*' test.ping" salt -C 'kvm* or cmp*' state.apply linux,ntp salt -C 'kvm* or cmp*' pkg.upgrade refresh=False |