core: Report the proper invalid state when waiting for the guest machine to be ready
This commit is contained in:
parent
7b440339f3
commit
87f8bd8c23
|
@ -7,6 +7,8 @@ IMPROVEMENTS:
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
|
- core: Report the proper invalid state when waiting for the guest machine
|
||||||
|
to be ready
|
||||||
- core: `Guest#capability?` now works with strings as well
|
- core: `Guest#capability?` now works with strings as well
|
||||||
- core: Fix NoMethodError in the new `Vagrant.has_plugin?` method [GH-2189]
|
- core: Fix NoMethodError in the new `Vagrant.has_plugin?` method [GH-2189]
|
||||||
- hosts/arch: NFS exporting works properly, no exceptions. [GH-2161]
|
- hosts/arch: NFS exporting works properly, no exceptions. [GH-2161]
|
||||||
|
|
|
@ -34,6 +34,8 @@ module Vagrant
|
||||||
# Otherwise, periodically verify the VM isn't in a bad state.
|
# Otherwise, periodically verify the VM isn't in a bad state.
|
||||||
while true
|
while true
|
||||||
state = env[:machine].provider.state.id
|
state = env[:machine].provider.state.id
|
||||||
|
# Used to report invalid states
|
||||||
|
Thread.current[:last_known_state] = state
|
||||||
if !@states.include?(state)
|
if !@states.include?(state)
|
||||||
Thread.current[:result] = false
|
Thread.current[:result] = false
|
||||||
break
|
break
|
||||||
|
@ -51,7 +53,7 @@ module Vagrant
|
||||||
if !states_thr[:result]
|
if !states_thr[:result]
|
||||||
raise Errors::VMBootBadState,
|
raise Errors::VMBootBadState,
|
||||||
valid: @states.join(", "),
|
valid: @states.join(", "),
|
||||||
invalid: env[:machine].provider.state.id
|
invalid: states_thr[:last_known_state]
|
||||||
end
|
end
|
||||||
|
|
||||||
# If it didn't boot, raise an error
|
# If it didn't boot, raise an error
|
||||||
|
|
Loading…
Reference in New Issue