Include stdout from health check if it is not nothing

This commit is contained in:
Alan Rominger 2022-10-19 15:38:36 -04:00
parent aaf6f5f17e
commit d6fea77082
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559

View File

@ -208,7 +208,10 @@ def run_until_complete(node, timing_data=None, **kwargs):
if state_name.lower() == 'failed':
work_detail = status.get('Detail', '')
if work_detail:
raise RemoteJobError(f'Receptor error from {node}, detail:\n{work_detail}')
if stdout:
raise RemoteJobError(f'Receptor error from {node}, detail:\n{work_detail}\nstdout:\n{stdout}')
else:
raise RemoteJobError(f'Receptor error from {node}, detail:\n{work_detail}')
else:
raise RemoteJobError(f'Unknown ansible-runner error on node {node}, stdout:\n{stdout}')