Skip to content

Commit

Permalink
Mount NFS with UDP protocol by default [GH-1706]
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jul 23, 2013
1 parent b2ee015 commit c0404e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion plugins/guests/linux/cap/mount_nfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def self.mount_nfs_folder(machine, ip, folders)
# 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,
Expand Down

0 comments on commit c0404e3

Please sign in to comment.