Set correct NIC number for hostmanager IP resolver

In the Vagrantfile, when using VirtualBox, the IP used for the
hostmanager plugin is retrieved from the wrong network adapter. This
causes the hostmanager to insert the wrong IP address in /etc/hosts. The
NIC numbering starts from 0, and the one used in the code is 2. That
corresponds to the 3rd NIC, which is actually used as the interface to
the Neutron external network. This commit sets the NIC number to 1,
which represents the internal network used by OpenStack.

Change-Id: I87f2b081c57c8eb3109e8d98b75ee438dd0d4b82
Closes-Bug: #1563367
Signed-off-by: Andrei-Lucian Șerb <lucian.serb@icloud.com>
This commit is contained in:
Andrei-Lucian Șerb 2016-03-29 17:54:52 +03:00
parent 7614e9d2a1
commit 2e0e8856a0
1 changed files with 1 additions and 1 deletions

2
vagrant/Vagrantfile vendored
View File

@ -160,7 +160,7 @@ Vagrant.configure(2) do |config|
end
when "virtualbox"
if vm.id
`VBoxManage guestproperty get #{vm.id} "/VirtualBox/GuestInfo/Net/2/V4/IP"`.split()[1]
`VBoxManage guestproperty get #{vm.id} "/VirtualBox/GuestInfo/Net/1/V4/IP"`.split()[1]
end
end
end