synced_folders/nfs: acquire process-level lock for export
This commit is contained in:
parent
901d3c3558
commit
c3e6c794cd
|
@ -30,6 +30,11 @@ IMPROVEMENTS:
|
|||
- guests/freebsd: Support for virtio interfaces. [GH-3082]
|
||||
- guests/openbsd: Support for virtio interfaces. [GH-3082]
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
- synced\_folders/nfs: Acquires a process-level lock so exports don't
|
||||
collide with Vagrant running in parallel.
|
||||
|
||||
PLUGIN AUTHOR CHANGES:
|
||||
|
||||
- New host capability: "rdp\_client". This capability gets the RDP connection
|
||||
|
|
|
@ -63,9 +63,16 @@ module VagrantPlugins
|
|||
# NFS exporting often requires sudo privilege and we don't want
|
||||
# overlapping input requests. [GH-2680]
|
||||
@@lock.synchronize do
|
||||
begin
|
||||
machine.env.lock("nfs-export") do
|
||||
machine.ui.info I18n.t("vagrant.actions.vm.nfs.exporting")
|
||||
machine.env.host.capability(:nfs_export,
|
||||
machine.ui, machine.id, machine_ip, folders)
|
||||
machine.env.host.capability(
|
||||
:nfs_export, machine.ui, machine.id, machine_ip, folders)
|
||||
end
|
||||
rescue Vagrant::Errors::EnvironmentLockedError
|
||||
sleep 1
|
||||
retry
|
||||
end
|
||||
end
|
||||
|
||||
# Mount
|
||||
|
|
Loading…
Reference in New Issue