guests/linux: more verbose output when shared folder mount fails
[GH-4403]
This commit is contained in:
parent
023ed006bf
commit
b42e9aef23
|
@ -53,6 +53,8 @@ BUG FIXES:
|
|||
- guests/fedora: Fix networks on Fedora 20 with libvirt. [GH-4104]
|
||||
- guests/freebsd: Rsync install for rsync synced folders work on
|
||||
FreeBSD 10. [GH-4008]
|
||||
- guests/linux: Show more verbose error when shared folder mount fails.
|
||||
[GH-4403]
|
||||
- guests/redhat: NFS setup should use systemd for RH7+ [GH-4228]
|
||||
- guests/smartos: Use `pfexec` for rsync. [GH-4274]
|
||||
- guests/windows: Reboot after hostname change. [GH-3987]
|
||||
|
|
|
@ -41,10 +41,15 @@ module VagrantPlugins
|
|||
while true
|
||||
success = true
|
||||
|
||||
stderr = ""
|
||||
mount_commands.each do |command|
|
||||
no_such_device = false
|
||||
stderr = ""
|
||||
status = machine.communicate.sudo(command, error_check: false) do |type, data|
|
||||
no_such_device = true if type == :stderr && data =~ /No such device/i
|
||||
if type == :stderr
|
||||
no_such_device = true if data =~ /No such device/i
|
||||
stderr += data.to_s
|
||||
end
|
||||
end
|
||||
|
||||
success = status == 0 && !no_such_device
|
||||
|
@ -56,7 +61,8 @@ module VagrantPlugins
|
|||
attempts += 1
|
||||
if attempts > 10
|
||||
raise Vagrant::Errors::LinuxMountFailed,
|
||||
command: mount_commands.join("\n")
|
||||
command: mount_commands.join("\n"),
|
||||
output: stderr
|
||||
end
|
||||
|
||||
sleep 2
|
||||
|
|
|
@ -750,6 +750,10 @@ en:
|
|||
can work properly. The command attempted was:
|
||||
|
||||
%{command}
|
||||
|
||||
The error output from the last command was:
|
||||
|
||||
%{output}
|
||||
linux_nfs_mount_failed: |-
|
||||
Mounting NFS shared folders failed. This is most often caused by the NFS
|
||||
client software not being installed on the guest machine. Please verify
|
||||
|
|
Loading…
Reference in New Issue