wait_for_connection: also retry interpreter discovery (#67040) (#67136)

self._discovered_interpreter_key is None unless a previous iteration
has attempted discovery.  In that case, force re-discovery, as the
previous attempt certainly failed.

(cherry picked from commit fd954a9c5c)
pull/67297/head
James Cassell 5 years ago committed by GitHub
parent 7b03b581dc
commit aa64519072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,4 @@
---
bugfixes:
- wait_for_connection - with pipelining enabled, interpreter discovery would
fail if the first connection attempt was not successful

@ -79,6 +79,9 @@ class ActionModule(ActionBase):
def ping_module_test(connect_timeout): def ping_module_test(connect_timeout):
''' Test ping module, if available ''' ''' Test ping module, if available '''
display.vvv("wait_for_connection: attempting ping module test") display.vvv("wait_for_connection: attempting ping module test")
# re-run interpreter discovery if we ran it in the first iteration
if self._discovered_interpreter_key:
task_vars['ansible_facts'].pop(self._discovered_interpreter_key, None)
# call connection reset between runs if it's there # call connection reset between runs if it's there
try: try:
self._connection.reset() self._connection.reset()

Loading…
Cancel
Save