New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible winrm connection hangs when connection is bad #83081
Comments
Files identified in the description: If these files are incorrect, please update the |
I added somedebug code to the winrm_get_command_output function. and all following calls will have an 'WinRMOperationTimeoutError'. |
Thanks for the info, I think I can understand what is happening here but trying to figure out the best way forward here will be hard. Unfortunately while your change might help in your case it is placed there to help in other scenarios I've come across. I've got a few ideas but need some time to figure out the best way forward. When you applied the change to comment out You could also try out the psrp connection plugin which is a lot more stable when it comes to writing the module payload. You might find it is better for your particular scenario. |
Hallo, when i remove the Here is the log
|
Thanks for sharing, I'll try to come up with a good solution that helps in your case as well as the existing one the code is trying to support. |
Summary
Problem:
We discovered that Ansible somehow hangs when the internet connection is bad and no timeout exception was thrown.
Ansible will hang on some random tasks and not finish or fail.
see log: after the Warning '[WARNING]: ERROR DURING WINRM SEND INPUT - attempting to recover' the process does not continue
Expectation:
If a task does not finish, a timeout error should be thrown and ansible should exit.
Test scenario
I set up an environment where I simulate a bad internet connection and check what ansible does.
sudo tt eth1 throttle.yaml --delay 0.5
similar issues
#72991
#47255
#79016
ansible-collections/ansible.windows#516
possible solution
I am not familiar with WinRM, but I have created a solution that seems to work.
devel...ChristianGeiger3:ansible:bugfix/winrm_hang
If this could be a solution, can I create a PR?
Issue Type
Bug Report
Component Name
winrm.py
Ansible Version
Configuration
OS / Environment
host: ubuntu 22.04
target: win10
Steps to Reproduce
Expected Results
When an Task will not finish, an Timeout error should be thrown and ansible should finish
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: