mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Increase the escalation prompt timeout
It was set to match the SSH connect timeout. Unfortunately, they would race when ssh fails to connect, and the connect timeout usually failed. This led to some misleading error messages. Fixes #12916
This commit is contained in:
parent
31b1abf580
commit
5bd096208c
1 changed files with 4 additions and 1 deletions
|
@ -392,7 +392,10 @@ class Connection(ConnectionBase):
|
||||||
become_error=False, become_nopasswd_error=False
|
become_error=False, become_nopasswd_error=False
|
||||||
)
|
)
|
||||||
|
|
||||||
timeout = self._play_context.timeout
|
# select timeout should be longer than the connect timeout, otherwise
|
||||||
|
# they will race each other when we can't connect, and the connect
|
||||||
|
# timeout usually fails
|
||||||
|
timeout = 2 + self._play_context.timeout
|
||||||
rpipes = [p.stdout, p.stderr]
|
rpipes = [p.stdout, p.stderr]
|
||||||
for fd in rpipes:
|
for fd in rpipes:
|
||||||
fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK)
|
fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK)
|
||||||
|
|
Loading…
Reference in a new issue