vagrant-openstack-provider
vagrant-openstack-provider copied to clipboard
Vagrant fail because of a floating IP conflict
With the following Vagrantfile, before i run vagrant up
there is one and only one floating IP allocated but not in use in my tenant. Let's say the IP is 1.2.3.4
and it comes from a floating IP pool named PublicNetwork
.
When i run vagrant up
, the machine server-1
takes the floating IP 1.2.3.4
. Then, the machine server-2
tries to take the same IP and vagrant fails saying the IP is already in use.
Vagrant.configure('2') do |config|
config.ssh.username = ENV['OS_SSH_USERNAME']
config.vm.provider :openstack do |os|
os.openstack_auth_url = ENV['OS_AUTH_URL']
os.tenant_name = ENV['OS_TENANT_NAME']
os.username = ENV['OS_USERNAME']
os.password = ENV['OS_PASSWORD']
os.flavor = ENV['OS_FLAVOR']
os.image = ENV['OS_IMAGE']
end
config.vm.define 'server-1' do |s|
s.vm.provider :openstack do |os|
os.floating_ip_pool = 'PublicNetwork'
end
end
config.vm.define 'server-2' do |s|
s.vm.provider :openstack do |os|
os.floating_ip = '1.2.3.4'
end
end
end