core: WaitForCommunicator always asks for state
This forces global-status to be up-to-date typically
This commit is contained in:
parent
75c8ed0e2c
commit
e107202050
|
@ -6,6 +6,8 @@ IMPROVEMENTS:
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
|
- core: Provider plugins more easily are compatible with global-status
|
||||||
|
and should show less stale data. [GH-3808]
|
||||||
- commands/package: Package with `--base` for VirtualBox doesn't
|
- commands/package: Package with `--base` for VirtualBox doesn't
|
||||||
crash. [GH-3827]
|
crash. [GH-3827]
|
||||||
- provisioners/puppet: Fix setting facter vars with Windows
|
- provisioners/puppet: Fix setting facter vars with Windows
|
||||||
|
|
|
@ -21,16 +21,6 @@ module Vagrant
|
||||||
states_thr = Thread.new do
|
states_thr = Thread.new do
|
||||||
Thread.current[:result] = true
|
Thread.current[:result] = true
|
||||||
|
|
||||||
# If we aren't caring about states, just basically put this
|
|
||||||
# thread to sleep because it'll get killed later.
|
|
||||||
if !@states
|
|
||||||
while true
|
|
||||||
sleep 300
|
|
||||||
end
|
|
||||||
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
# 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].state.id
|
state = env[:machine].state.id
|
||||||
|
@ -39,7 +29,7 @@ module Vagrant
|
||||||
Thread.current[:last_known_state] = state
|
Thread.current[:last_known_state] = state
|
||||||
|
|
||||||
# Check if we have the proper state so we can break out
|
# Check if we have the proper state so we can break out
|
||||||
if !@states.include?(state)
|
if @states && !@states.include?(state)
|
||||||
Thread.current[:result] = false
|
Thread.current[:result] = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue