From ba71c30e04c71c4977502e3e1c671c76c85dbe58 Mon Sep 17 00:00:00 2001 From: Rui Lopes Date: Sat, 28 Sep 2019 12:20:10 +0100 Subject: [PATCH] retry the wait for a windows reboot on connect timeout errors --- plugins/guests/windows/cap/reboot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/guests/windows/cap/reboot.rb b/plugins/guests/windows/cap/reboot.rb index 452042f82..b385f0022 100644 --- a/plugins/guests/windows/cap/reboot.rb +++ b/plugins/guests/windows/cap/reboot.rb @@ -28,7 +28,7 @@ module VagrantPlugins wait_remaining = MAX_REBOOT_RETRY_DURATION begin wait_for_reboot(machine) - rescue Vagrant::Errors::MachineGuestNotReady, WinRM::WinRMHTTPTransportError => e + rescue HTTPClient::ConnectTimeoutError, Vagrant::Errors::MachineGuestNotReady, WinRM::WinRMHTTPTransportError => e raise if wait_remaining < 0 @logger.warn("Machine not ready, cannot start reboot yet. Trying again") sleep(5)