From 8c671f90dbddbde1bc3e791a607d56dc96900b13 Mon Sep 17 00:00:00 2001 From: Sofer Athlan-Guyot Date: Thu, 28 Sep 2017 12:35:40 +0200 Subject: [PATCH] Make wait_for print the failed ouput. This can help to identify what exactly the failure was. For instance during overcloud validation "heat stack-show pingtest_stack" can provide more context to the actual error. Change-Id: I18a73b2936975c056ebc3f4b984349b61a4ed58d --- scripts/wait_for | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/wait_for b/scripts/wait_for index 82fe763e2..0e151275b 100755 --- a/scripts/wait_for +++ b/scripts/wait_for @@ -133,7 +133,9 @@ function check_cmd { exit 0 elif [[ -n "$FAIL_MATCH_OUTPUT" ]] \ && [[ $OUTPUT =~ $FAIL_MATCH_OUTPUT ]]; then - echo "Command output matched '$FAIL_MATCH_OUTPUT'. Exiting..." + echo "Command output matched '$FAIL_MATCH_OUTPUT'. Here is the complete output failure:" + echo "${OUTPUT}" + echo "Exiting ..." exit 1 elif [[ -z "$SUCCESSFUL_MATCH_OUTPUT" ]] && [[ $STATUS -eq 0 ]]; then # The command successfully completed and we aren't testing against