You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SSHOperator documentation states that we should be using cmd_timeout instead of timeout
:param timeout: (deprecated) timeout (in seconds) for executing the command. The default is 10 seconds.
Use conn_timeout and cmd_timeout parameters instead.
But the code doesn't use cmd_timeout at all - and it's still passing self.timeout when running the ssh command:
Actually after more testing - this is not enough - the timeout logic in hooks/ssh.py is "broken"
while not channel.closed or channel.recv_ready() or channel.recv_stderr_ready():
readq, _, _ = select([channel], [], [], timeout)
for recv in readq:
Then timeout occurs, readq will be an empty list but there is no logic to handle that, and the code will keep reading forever. Not sure yet of the best way to handle this ...
Thanks for working on this issue @punx120, I have assigned it to you 😄
Then timeout occurs, readq will be an empty list but there is no logic to handle that, and the code will keep reading forever. Not sure yet of the best way to handle this ...
If read, write, except (the latter two are currently being thrown away with _) are all empty then you know you've hit your timeout case. Try adding such a condition to the hook code it should get you unblocked! 😃
Activity
boring-cyborg commentedon Oct 21, 2022
Thanks for opening your first issue here! Be sure to follow the issue template!
punx120 commentedon Oct 24, 2022
Actually after more testing - this is not enough - the timeout logic in hooks/ssh.py is "broken"
Then timeout occurs,
readqwill be an empty list but there is no logic to handle that, and the code will keep reading forever. Not sure yet of the best way to handle this ...o-nikolas commentedon Oct 25, 2022
Thanks for working on this issue @punx120, I have assigned it to you 😄
If
read,write,except(the latter two are currently being thrown away with_) are all empty then you know you've hit your timeout case. Try adding such a condition to the hook code it should get you unblocked! 😃punx120 commentedon Oct 25, 2022
Right, i'll give it a try an update the above PR
punx120 commentedon Oct 26, 2022
Ok done - I updated the PR and fix/added tests.
SSHOperator ignores cmd_timeout (apache#27182)
SSHOperator ignores cmd_timeout (#27182) (#27184)