Skip to content

Commit

Permalink
Fix async logic when parsing fails (#17091)
Browse files Browse the repository at this point in the history
We want to NOT consider the async task as failed if the result is
not parsed, which was the intent of:

  #16458

However, the logic doesn't actually do that because we default
the 'parsed' value to True. It should default to False so that
we continue waiting, as intended.
(cherry picked from commit bf8c871)
  • Loading branch information
Shrews authored and bcoca committed Aug 15, 2016
1 parent 616a51a commit d35377d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/executor/task_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def _poll_async_result(self, result, templar, task_vars=None):
# have issues which result in a half-written/unparseable result
# file on disk, which manifests to the user as a timeout happening
# before it's time to timeout.
if int(async_result.get('finished', 0)) == 1 or ('failed' in async_result and async_result.get('parsed', True)) or 'skipped' in async_result:
if int(async_result.get('finished', 0)) == 1 or ('failed' in async_result and async_result.get('parsed', False)) or 'skipped' in async_result:
break

time_left -= self._task.poll
Expand Down

0 comments on commit d35377d

Please sign in to comment.