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 workaround for azure bug. #5864

Merged
merged 1 commit into from
Feb 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions provisioner/windows-restart/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ var waitForRestart = func(p *Provisioner, comm packer.Communicator) error {
var cmd *packer.RemoteCmd
trycommand := TryCheckReboot
abortcommand := AbortReboot

// This sleep works around an azure/winrm bug. For more info see
// https://github.com/hashicorp/packer/issues/5257; we can remove the
// sleep when the underlying bug has been resolved.
time.Sleep(1 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like the right direction, but my concerns are

  • This only impacts ntlmssp connections. should we limit it to those?
  • is 1 second long enough? What happens if it's not? Should we make it configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an easy way to test for ntlmssp connections from inside the provisioner? If so, that's definitely a good idea. And in that case I'd be more willing to bump the sleep length "just in case"; I wanted to keep it short in order to not unduly impact other users. For what it's worth, this actually works on my computer with a sleep of 500ms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an easy way to test for ntlmssp connections from inside the provisioner?

probably not, thinking about it...


// Stolen from Vagrant reboot checker
for {
log.Printf("Check if machine is rebooting...")
Expand Down