summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-02-06 13:13:28 +0000
committerGerrit Code Review <review@openstack.org>2019-02-06 13:13:28 +0000
commit1f4d658d15da0b7e26cf2bf86e25e4a7a6d3a71d (patch)
treeb18493e91eba98037c792148b64fcfb1de1c44b6
parent214146209de4cb524df95b8f35660524f55037ea (diff)
parent85c70008d6a059c82e1bcd28053b392fb39aa6f8 (diff)
Merge "Retry jobs on winrm send_input failed"
-rw-r--r--zuul/executor/server.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 2547408..b3b1a8d 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -1959,6 +1959,15 @@ class AnsibleJob(object):
1959 job_output.write("{now} | {line}\n".format( 1959 job_output.write("{now} | {line}\n".format(
1960 now=datetime.datetime.now(), 1960 now=datetime.datetime.now(),
1961 line=line.decode('utf-8').rstrip())) 1961 line=line.decode('utf-8').rstrip()))
1962 elif ret == 2:
1963 # This is a workaround to detect winrm connection failures that are
1964 # not detected by ansible. These can be detected if the string
1965 # 'FATAL ERROR DURING FILE TRANSFER' is in the ansible output.
1966 # In this case we should treat the host as unreachable and retry
1967 # the job.
1968 for line in syntax_buffer:
1969 if b'FATAL ERROR DURING FILE TRANSFER' in line:
1970 return self.RESULT_UNREACHABLE, None
1962 1971
1963 return (self.RESULT_NORMAL, ret) 1972 return (self.RESULT_NORMAL, ret)
1964 1973