Enable retries when fetching container state

Fixes #74
This commit is contained in:
Fabio Rehm 2013-07-08 13:05:29 -03:00
parent b8b545c277
commit 3e73a85d52
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ module Vagrant
end
def state
if @name && run(:info, '--name', @name) =~ /^state:[^A-Z]+([A-Z]+)$/
if @name && run(:info, '--name', @name, retryable: true) =~ /^state:[^A-Z]+([A-Z]+)$/
$1.downcase.to_sym
elsif @name
:unknown

View file

@ -126,7 +126,7 @@ describe Vagrant::LXC::Driver::CLI do
it 'calls lxc-info with the right arguments' do
subject.state
subject.should have_received(:run).with(:info, '--name', name)
subject.should have_received(:run).with(:info, '--name', name, retryable: true)
end
it 'maps the output of lxc-info status out to a symbol' do