Allow user to choose NFS protocol version, defaulting to 3
NFSv4 has siginificant added complexity in the form of ID-mapping which can cause problems with applications without extra setup. Best to force version 3 unless the user requests it. Conflicts: lib/vagrant/systems/linux.rb
This commit is contained in:
parent
f095939800
commit
ced99edd59
|
@ -26,6 +26,7 @@ Vagrant::Config.run do |config|
|
|||
|
||||
config.nfs.map_uid = :auto
|
||||
config.nfs.map_gid = :auto
|
||||
config.nfs.version = 3
|
||||
|
||||
config.package.name = 'package.box'
|
||||
end
|
||||
|
|
|
@ -3,6 +3,7 @@ module Vagrant
|
|||
class NFSConfig < Base
|
||||
attr_accessor :map_uid
|
||||
attr_accessor :map_gid
|
||||
attr_accessor :version
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,7 +60,7 @@ module Vagrant
|
|||
|
||||
# Do the actual creating and mounting
|
||||
@vm.channel.sudo("mkdir -p #{real_guestpath}")
|
||||
@vm.channel.sudo("mount #{ip}:'#{opts[:hostpath]}' #{real_guestpath}",
|
||||
@vm.channel.sudo("mount -o vers=#{opts[:version]} #{ip}:'#{opts[:hostpath]}' #{real_guestpath}",
|
||||
:error_class => LinuxError,
|
||||
:error_key => :mount_nfs_fail)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue