Mount NFS with UDP protocol by default [GH-1706]

This commit is contained in:
Mitchell Hashimoto 2013-07-23 13:19:53 -07:00
parent b2ee015d00
commit c0404e3f63
2 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,9 @@ IMPROVEMENTS:
- If Ansible fails to run properly, show an error message. [GH-1699]
- Adding a box with the `--provider` flag will now allow a box for
any of that provider's supported formats.
- NFS mounts enable UDP by default, resulting in higher performance.
(Because mount is over local network, packet loss is not an issue)
[GH-1706]
BUG FIXES:

View File

@ -18,7 +18,7 @@ module VagrantPlugins
# Mount
hostpath = opts[:hostpath].dup
hostpath.gsub!("'", "'\\\\''")
mount_command = "mount -o vers=#{opts[:nfs_version]} #{ip}:'#{hostpath}' #{expanded_guest_path}"
mount_command = "mount -o udp,vers=#{opts[:nfs_version]} #{ip}:'#{hostpath}' #{expanded_guest_path}"
retryable(:on => Vagrant::Errors::LinuxNFSMountFailed, :tries => 5, :sleep => 2) do
machine.communicate.sudo(mount_command,