Skip to content
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

Add a parameter to limit the number of loops to wait for winrm to reply. #297

Closed
wants to merge 1 commit into from
Closed

Add a parameter to limit the number of loops to wait for winrm to reply. #297

wants to merge 1 commit into from

Conversation

mianos
Copy link

@mianos mianos commented Jun 22, 2020

If windows has a file locked or the registry is locked winrm will loop forever waiting for a reply.

This makes ansible useless when it is used with thousands of servers as once a server gets blocked it does not continue.

When instantiating Protocol (or Session as kwargs are passed from Session to Protocol) a new parameter command_loop is added, being the number of loops get_command_output will do before it raises a timeout exception. By default this is 0 and it will loop forever, maintaining the existing functionality.

Once winrm in get_command_output returns with 'WinRMOperationTimeoutError' seconds * command_loops, it will raise:
WinRMError('Too many loops waiting for command_done ({0})'.format(self.command_loops))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant