mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
check for 'ssh' service to see if interface is up
the 'echo' service is often not available out-of-the-box, so the 'ping' of the ssh interface fails. This results in the wrong ip addresses being used in /etc/exports, which results in the vm not being able to mount the vagrant shares. The 'vagrant ssh interface' will have the service 'ssh' available (you won't be able to login to your vagrant box else), so it makes sense to use that service for the ping. This fixes the vm not being able to mount the shares over nfs after a reload due to the wrong ip addresses being used.
This commit is contained in:
parent
d5ba63d413
commit
c1d2144ec2
@ -79,7 +79,7 @@ module VagrantPlugins
|
|||||||
# Check if we can open a connection to the host
|
# Check if we can open a connection to the host
|
||||||
def ping(host, timeout = 3)
|
def ping(host, timeout = 3)
|
||||||
::Timeout.timeout(timeout) do
|
::Timeout.timeout(timeout) do
|
||||||
s = TCPSocket.new(host, 'echo')
|
s = TCPSocket.new(host, 'ssh')
|
||||||
s.close
|
s.close
|
||||||
end
|
end
|
||||||
true
|
true
|
||||||
|
Loading…
Reference in New Issue
Block a user