From 3f559299c232bbb7639d02243c95d6256cdf94d4 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 --- mcp/config/states/dpdk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mcp/config/states/dpdk') diff --git a/mcp/config/states/dpdk b/mcp/config/states/dpdk index 653ffc0ed..5ae2aac48 100755 --- a/mcp/config/states/dpdk +++ b/mcp/config/states/dpdk @@ -13,8 +13,7 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" salt -I 'nova:compute' system.reboot -wait_for 90 "! salt -I 'nova:compute' test.ping | " \ - "tee /dev/stderr | grep -Fq 'Not connected'" +wait_for 90.0 "salt -I 'nova:compute' test.ping" salt -I 'nova:compute' alternatives.set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk salt -I 'nova:compute' service.restart openvswitch-switch -- cgit 1.2.3-korg