Catch "Salt request timed out" error in execute_commands
Change-Id: I499d29864a08f8b02d3e84ab630df5ce9d4b345f
diff --git a/tcp_tests/managers/execute_commands.py b/tcp_tests/managers/execute_commands.py
index dda95d2..5abc60c 100644
--- a/tcp_tests/managers/execute_commands.py
+++ b/tcp_tests/managers/execute_commands.py
@@ -115,6 +115,9 @@
failed += 1
if 'Minion did not return. [Not connected]' in s:
failed += 1
+ if ('Salt request timed out. The master is not responding.'
+ in s):
+ failed += 1
if s.startswith("[CRITICAL]"):
failed += 1
if 'Fatal' in s:
@@ -133,11 +136,14 @@
if x == 1 and skip_fail is False:
# In the last retry iteration, raise an exception
raise Exception("Step '{0}' failed:\n"
- "=============== STDOUT: ===============\n"
+ "=============== Command: ==============\n"
"{1}\n"
- "=============== STDERR: ===============\n"
+ "=============== STDOUT: ===============\n"
"{2}\n"
+ "=============== STDERR: ===============\n"
+ "{3}\n"
.format(description,
+ cmd,
result.stdout_str,
result.stderr_str))