[SOLVED] [Openstack/Devstack] Cannot reach Internet via Floating IP
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[Openstack/Devstack] Cannot reach Internet via Floating IP
Hi all,
This is my devstack lab installed on VirtualBox.
Code:
stack@vlab:~$ cat /etc/devstack-version
DevStack Version: stein
Change: 669b0c5e4eba1a721dc02650e000fb0ac6bfd11b Merge "Remove crusty old python 3 package version logic" into stable/stein 2019-04-26 09:32:45 +0000
OS Version: Ubuntu 16.04 xenial
I have created instance (vm: heat_server), with floating IP/port hoping it will have access to internet.
Code:
stack@vlab:~$ openstack server list
+--------------------------------------+-------------+---------+------------------------------------+--------------------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------------+---------+------------------------------------+--------------------------+---------+
| 6f8fbc70-dfc5-4840-ba18-cf7869863af6 | heat_server | ACTIVE | heat_network=10.1.1.4, 172.24.4.10 | cirros-0.4.0-x86_64-disk | m1.tiny |
| 0eb31f9d-4524-4382-9868-6bb1df1d84fd | testvm2 | SHUTOFF | fxnet=10.2.0.5 | cirros-0.4.0-x86_64-disk | m1.tiny |
| 4766f91f-b1ec-44f6-96c4-6d1164ba754e | testvm1 | SHUTOFF | fxnet=10.2.0.11 | cirros-0.4.0-x86_64-disk | m1.tiny |
+--------------------------------------+-------------+---------+------------------------------------+--------------------------+---------+
Unfortunately it does not reach Internet.
I did a small investigation:
1. I checked for network "public" - OK
2. I checked for subnet "public-subnet" - OK
3. I checked for router "public" and I see - NONE
Questions:
1. Could that be a reason of not reaching internet from my instance (missing public router)?
2. Is this true that connectivity to internet via Floating IP is in fact NATed by Neutron via internal network (in my case 10.1.1.x) ?
I made it finally to work.
But now my problem is that after instance reboot, I cannot access it via Floating IP
I can still get in via internal network (via qrouter).
I did fresh installation of Devstack (from Master branch - DevStack Version: victoria)
In local.conf I have specified:
Code:
HOST_IP=192.168.56.109 - this is eth1/enp0s8 and refers to Host-Only interface in my VirtualBox
FLAT_INTERFACE=enp0s8
FLOATING_RANGE=192.168.56.224/27 - for this installation I assigned floating IPs on the same class as HOST_IP (its not clear yet to me whether it should be the same class or should be different. The point is that by adding Floating IP to the instance I could access it from Devstack itself - and that is/was OK for the moment).
I have deployed stack using this example https://docs.ukcloud.com/articles/op...-template.html , with 2 changes: 1. Removed volume (for some reason it gives errors and blocks deployment - to troubleshoot later)
2. Replace network "Internet" with "Public"
After adding 2 rules to the "default" security group:
Code:
openstack security group rule create default --protocol tcp --dst-port 22:22 --remote-ip 0.0.0.0/0
openstack security group rule create --protocol icmp default
I could access instance/vm heat_server via 192.168.56.227 from Devstack.
After reboot of the instance and later also all Devstack Vbox VM, I have no more access via 192.168.56.227.
I can still access it via: sudo ip netns exec qrouter-7563b1f4-2635-412b-8053-dda164a5b279 ssh cirros@10.1.1.9
Code:
stack@vlab:~$ openstack server list
+--------------------------------------+-------------+---------+---------------------------------------------------------+--------------------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------------+---------+---------------------------------------------------------+--------------------------+---------+
| 95fce8b8-9d4d-4ccd-a17b-cb367537e504 | heat_server | ACTIVE | heat_network=10.1.1.9, 192.168.56.227 | cirros-0.5.1-x86_64-disk | m1.tiny |
| 1935c01d-7451-439d-9335-a0c2690e145a | vm2 | SHUTOFF | private=10.0.0.21, fd07:a88f:8dd3:0:f816:3eff:fee1:9f91 | cirros-0.5.1-x86_64-disk | m1.tiny |
+--------------------------------------+-------------+---------+---------------------------------------------------------+--------------------------+---------+
I dont know where to look now / where to start troubleshooting.
The IP address of external bridge br-ex is not persistent. When you reboot, you lose it. Same for the physical volumes used by Cinder and the filesystem used by Swift.
I use this script to recreate them (only tested on Ussuri and a few earlier versions, and it uses the standard IP address):
Code:
$ cat restore-after-reboot
sudo ip a add 172.24.4.1/24 dev br-ex
sudo ip link set dev br-ex up
sudo mount -t xfs -o loop,noatime,nodiratime,logbufs=8 /opt/stack/data/swift/drives/images/swift.img /opt/stack/data/swift/drives/sdb1
if ! losetup | grep -q volumes-default-backing-file
then
sudo losetup -f --show --direct-io=on /opt/stack/data/stack-volumes-default-backing-file
else
echo stack-volumes-default-backing-file exists already
fi
if ! losetup | grep -q volumes-lvmdriver-1-backing-file
then
sudo losetup -f --show --direct-io=on /opt/stack/data/stack-volumes-lvmdriver-1-backing-file
else
echo stack-volumes-lvmdriver-1-backing-file exists already
fi
sudo systemctl restart devstack@c-vol
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.