From 2b7c862e8c668d8fabc784680b05bec75baff2c6 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sun, 31 Dec 2017 19:35:17 +0100 Subject: 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 (cherry picked from commit 3f559299c232bbb7639d02243c95d6256cdf94d4) --- mcp/config/states/baremetal_init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mcp/config/states/baremetal_init') diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init index 5674e6227..5a8cb49fc 100755 --- a/mcp/config/states/baremetal_init +++ b/mcp/config/states/baremetal_init @@ -29,7 +29,6 @@ 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 -- cgit 1.2.3-korg