providers/docker: retry sync_folders action

This commit is contained in:
Mitchell Hashimoto 2014-04-20 08:27:35 -07:00
parent e38ae9b5c6
commit 89b6336d21
2 changed files with 6 additions and 0 deletions

View File

@ -148,6 +148,9 @@ module VagrantPlugins
action_env = { synced_folders_config: new_config }
begin
host_machine.action(:sync_folders, action_env)
rescue Vagrant::Errors::MachineLockedError
sleep 1
retry
rescue Vagrant::Errors::UnimplementedProviderAction
callable = Vagrant::Action::Builder.new
callable.use Vagrant::Action::Builtin::SyncedFolders

View File

@ -72,6 +72,9 @@ module VagrantPlugins
begin
host_machine.action(:sync_folders, action_env)
rescue Vagrant::Errors::MachineLockedError
sleep 1
retry
rescue Vagrant::Errors::UnimplementedProviderAction
callable = Vagrant::Action::Builder.new
callable.use Vagrant::Action::Builtin::SyncedFolders