vagrant-nfs_guest 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/example_box/Vagrantfile +1 -1
- data/lib/vagrant-nfs_guest/action/mount_nfs.rb +1 -0
- data/lib/vagrant-nfs_guest/action/unmount_nfs.rb +14 -0
- data/lib/vagrant-nfs_guest/hosts/bsd/cap/mount_nfs.rb +0 -1
- data/lib/vagrant-nfs_guest/hosts/bsd/cap/unmount_nfs.rb +1 -2
- data/lib/vagrant-nfs_guest/hosts/linux/cap/mount_nfs.rb +0 -1
- data/lib/vagrant-nfs_guest/hosts/linux/cap/unmount_nfs.rb +1 -2
- data/lib/vagrant-nfs_guest/version.rb +1 -1
- metadata +2 -3
- data/example_box/vagrant_share/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68bea2f019bd5edd93dc71b5f11914463aef8e82
|
4
|
+
data.tar.gz: d1624a4519e1b43607df404a6f10961142941d1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18d17c27a60291cb93c48ba1f7732d9aa9bb25746ec1aaf21003df1ba7ca2f65739f54ce76d0b7b29ae9064556f42e4f7f0c551f5bf31f30da0a9409a9327875
|
7
|
+
data.tar.gz: 584169bcaaf4ec740a3731b0e7aee83c1933c0dc03f45a38f199fb81648e4976cd865a9debacce1a8d3429c89be30779f6998cc4781dd4a39d6a314acf1979f3
|
data/README.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
- NEW: added untested support for Docker providers (Please raise any issues if they don't work!).
|
6
6
|
- NEW: added Parallels provider support
|
7
7
|
- NEW: Redhat/CentOS guest support added.
|
8
|
+
- NEW: Now properly handles force halts
|
8
9
|
- FIXED: suspend and resume with 'up' instead of 'resume' fixed.
|
9
10
|
- Supports Vagrant > 1.6.
|
10
11
|
- Handles actions ```up```, ```halt```, ```destroy```, ```suspend```, ```resume``` and ```package``` properly.
|
@@ -28,8 +29,9 @@ Guest VMs we've tested include:
|
|
28
29
|
- other Linux based guests may work fine with the generic Linux support. But no guarantee
|
29
30
|
|
30
31
|
Hosts we've tested include:
|
31
|
-
- OSX (Mavericks, Yosemite, El Capitan)
|
32
|
+
- OSX (Mavericks, Yosemite, El Capitan, Siera)
|
32
33
|
- Ubuntu (precise, trusty)
|
34
|
+
- CentOS (6, 7)
|
33
35
|
- other Linux based OSs should work fine, but will need testing, again no guarantee
|
34
36
|
|
35
37
|
We're happy to receive pull-request to support alternatives hosts and guests. To implement this support it's relatively trivial if you look in ./lib/hosts and ./lib/guests.
|
data/example_box/Vagrantfile
CHANGED
@@ -21,7 +21,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
21
21
|
# the path on the guest to mount the folder. And the optional third
|
22
22
|
# argument is a set of non-required options.
|
23
23
|
config.vm.synced_folder '.', '/vagrant', disabled: true
|
24
|
-
config.vm.synced_folder './vagrant_share', '/vagrant', type: 'nfs_guest'
|
24
|
+
config.vm.synced_folder './vagrant_share', '/vagrant', create: true, type: 'nfs_guest'
|
25
25
|
#config.vm.synced_folder './vagrant_share', '/vagrant', type: 'nfs'
|
26
26
|
|
27
27
|
end
|
@@ -16,6 +16,20 @@ module VagrantPlugins
|
|
16
16
|
@machine.ui.info(I18n.t("vagrant_nfs_guest.actions.vm.nfs.unmounting"))
|
17
17
|
folders = @machine.config.vm.synced_folders
|
18
18
|
|
19
|
+
folders.each do |name, opts|
|
20
|
+
if opts[:type] == :nfs_guest
|
21
|
+
opts[:hostpath] = File.expand_path(opts[:hostpath], env[:root_path])
|
22
|
+
if env[:force_halt]
|
23
|
+
# If this is a force halt, force unmount the nfs shares.
|
24
|
+
opts[:unmount_options] = opts.fetch(:unmount_options, []) << '-f'
|
25
|
+
# We have to change the working dir if inside a hostmount to prevent "No such file or directory - getcwd" errors.
|
26
|
+
if Dir.pwd.start_with?(opts[:hostpath])
|
27
|
+
Dir.chdir("#{opts[:hostpath]}/..")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
19
33
|
@machine.env.host.capability(:nfs_unmount, @machine.ui, folders)
|
20
34
|
end
|
21
35
|
|
@@ -18,7 +18,6 @@ module VagrantPlugins
|
|
18
18
|
mount_options = opts.fetch(:mount_options, ["noatime"])
|
19
19
|
nfs_options = mount_options.empty? ? "" : "-o #{mount_options.join(',')}"
|
20
20
|
|
21
|
-
system("mkdir -p #{opts[:hostpath]}")
|
22
21
|
mount_command = "mount -t nfs #{nfs_options} '#{ip}:#{opts[:guestpath]}' '#{opts[:hostpath]}'"
|
23
22
|
if system(mount_command)
|
24
23
|
break
|
@@ -16,8 +16,7 @@ module VagrantPlugins
|
|
16
16
|
|
17
17
|
unmount_options = opts.fetch(:unmount_options, []).join(" ")
|
18
18
|
|
19
|
-
|
20
|
-
umount_msg = `umount #{unmount_options} '#{expanded_host_path}' 2>&1`
|
19
|
+
umount_msg = `umount #{unmount_options} '#{opts[:hostpath]}' 2>&1`
|
21
20
|
|
22
21
|
if $?.exitstatus != 0
|
23
22
|
if not umount_msg.include? 'not currently mounted'
|
@@ -18,7 +18,6 @@ module VagrantPlugins
|
|
18
18
|
mount_options = opts.fetch(:mount_options, ["noatime"])
|
19
19
|
nfs_options = mount_options.empty? ? "" : "-o #{mount_options.join(',')}"
|
20
20
|
|
21
|
-
system("mkdir -p #{opts[:hostpath]}")
|
22
21
|
mount_command = "sudo mount -t nfs #{nfs_options} '#{ip}:#{opts[:guestpath]}' '#{opts[:hostpath]}'"
|
23
22
|
if system(mount_command)
|
24
23
|
break
|
@@ -16,8 +16,7 @@ module VagrantPlugins
|
|
16
16
|
|
17
17
|
unmount_options = opts.fetch(:unmount_options, []).join(" ")
|
18
18
|
|
19
|
-
|
20
|
-
umount_msg = `sudo umount #{unmount_options} '#{expanded_host_path}' 2>&1`
|
19
|
+
umount_msg = `sudo umount #{unmount_options} '#{opts[:hostpath]}' 2>&1`
|
21
20
|
|
22
21
|
if $?.exitstatus != 0
|
23
22
|
if not umount_msg.include? 'not currently mounted'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-nfs_guest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Garfield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,6 @@ files:
|
|
52
52
|
- README.md
|
53
53
|
- Rakefile
|
54
54
|
- example_box/Vagrantfile
|
55
|
-
- example_box/vagrant_share/.keep
|
56
55
|
- lib/vagrant-nfs_guest.rb
|
57
56
|
- lib/vagrant-nfs_guest/action/mount_nfs.rb
|
58
57
|
- lib/vagrant-nfs_guest/action/unmount_nfs.rb
|
File without changes
|