-
Notifications
You must be signed in to change notification settings - Fork 128
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
Executing a winrm command that shuts down the machine #161
Comments
Indeed, we used to return early when timeouts were happening, now we try harder because it can happen the remote host just times out for long commands. |
I'll have to think on this as well. I'll have to look a little deeper as this may already exist, but I'd expect there to be some sort of configurable command timeout error that would eventually be returned to the caller vs waiting forever. In this specific case we expect the connection to break - signaling command completion. So the behavior we really want is to execute the command and block until the machine stops responding. The command timeout seems like a good backstop, but I think ultimately in this case stembuild needs to kick off the winrm command one one goroutine and then in another poll for the machine to be shutdown (ideally querying the IaaS). |
…e the command Fixes masterzen#161 where commands that cause the host to shut down never complete and run forever.
It appears a recent commit broke some assumptions in stembuild that executes a sysprep shutdown command that never finishes.
Is there a recommended method of executing a winrm command which may be interrupted by a shutdown? Previously we were expecting an error like
winrm connection event: unknown error Post "http://10.220.41.242:5985/wsman": read tcp 10.220.41.9:34002->10.220.41.242:5985: read: connection timed out
and just continuing when that happened. Now the winrm command never finishes and winrm command fetchOutput goes into an infinite loop waiting for the machine to come back up which will never happen.The text was updated successfully, but these errors were encountered: