mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
parent
b7b19d139e
commit
4a6161bab8
1 changed files with 5 additions and 0 deletions
|
@ -279,6 +279,11 @@ def _ssh_retry(func):
|
||||||
# 255 = failure from the ssh command itself
|
# 255 = failure from the ssh command itself
|
||||||
except (AnsibleControlPersistBrokenPipeError) as e:
|
except (AnsibleControlPersistBrokenPipeError) as e:
|
||||||
# Retry one more time because of the ControlPersist broken pipe (see #16731)
|
# Retry one more time because of the ControlPersist broken pipe (see #16731)
|
||||||
|
cmd = args[0]
|
||||||
|
if self._play_context.password and isinstance(cmd, list):
|
||||||
|
# This is a retry, so the fd/pipe for sshpass is closed, and we need a new one
|
||||||
|
self.sshpass_pipe = os.pipe()
|
||||||
|
cmd[1] = b'-d' + to_bytes(self.sshpass_pipe[0], nonstring='simplerepr', errors='surrogate_or_strict')
|
||||||
display.vvv(u"RETRYING BECAUSE OF CONTROLPERSIST BROKEN PIPE")
|
display.vvv(u"RETRYING BECAUSE OF CONTROLPERSIST BROKEN PIPE")
|
||||||
return_tuple = func(self, *args, **kwargs)
|
return_tuple = func(self, *args, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue