r/openstack • u/firestorm_v1 • Jun 19 '24
Openstack internal network router doesn't route, what am I missing?
Newly setup Openstack Yoga test environment using Juju, MAAS, and a NetApp controller for volumes. Instance networking is the only thing I'm having a problem with.
I've got a non-admin project called "test" with an internal network called "test_internal" and subnet called "internal_subnet" which is a 192.168.1.x/24 network. I've created a test_router attached to external_network (10.0.200.x/24) and attached to internal_subnet as 192.168.0.1 acting as the default gateway for that subnet.
Instances attached to the internal_subnet get an IP address and can communicate amongst each other as expected but they have no Internet access. They can ping the gateway address. Instances attached to external_network get a 10.0.200.x IP address and can get to the Internet as expected.
I set up a minimal installation of Debian 10 in an instance and attached both internal and external subnets to the instance and configured it to be a simple iptables router. Once iptables loaded, the internal instances had external network and Internet access.
Since this is a test environment for me only, there's only one security group and it's completely wide open. I've reviewed the networking setup part of the Openstack Yoga guide and can't figure out what's going on with the router.
Any ideas or suggestions??
View all comments
Show parent comment
1
u/lathiat Jun 20 '24 edited Jun 20 '24
Note that how you mark the hypervisors down can matter, e.g. marking them down in nova won't stop neutron or OVN, etc. Easiest non-production way to stop the OVN functions running elsewhere would be to stop the ovn-controller service on the other nodes. Should then fail over the router to this last HV. You can also figure out where the routers are located etc but it's a little obtuse.
The stale tap interfaces can happen for a few reasons, these should have been cleaned up when those VMs stopped and after a reboot should be cleaned up on startup. It's not strictly a concern if you have a few stale tap interfaces, the interfaces themselves won't hurt though it can indicate maybe something isn't working right that may actually matter. It's worth checking if there are any errors in the neutron and ovn logs on both the nova-compute and ovn-central units, sometimes it stops programming all the databases properly or has some issue like that. Which could be why.
Can you detail for my understanding:
ovs-vsctl list-ports br0juju config ovn-chassis bridge-interface-mappingsjuju config ovn-chassis ovn-bridge-mappingsSomething else you could try is
snap install --classic hotsosand run hotsos on all of your ovn-central and nova-compute units. It's a tool we use in the Canonical Support team to automatically find and highlight various known issues in logs or data, and may possibly highlight something interesting. It may also hit false positives, so don't assume everything it notes is an issue but often can indicate places to look.As a final note, while the OVS switch port layout looks simple in theory.. e.g. tapX on br-int, br-int patched to br0, br0 patched to a physical interface.. it's not actually a simple switch with ports on it like you might expect, there are 10s-100s of "flow rules" that both modify the traffic (e.g. to add/remove nat), block/allow the traffic, and also in most cases will specifically determine which port it gets transmitted out of, possibly with VLANs applied etc. So while the port layout is correct, it doesn't mean the traffic will actually flow through it in the way you might guess like a normal switch. You can see these rules for example if you run
ovs-ofctl -O OpenFlow13 dump-flows br-int. As a result of this, also note that tcpdump on the 'bridge interface', e.g. br0 or br-int, won't work the way you expect it to. Sometimes you see some traffic, but you won't see most of it, so can't be used for diagnostics. The reason is that the linux interface with the same name as the openvswitch bridge is not actually the bridge itself, but a port plugged into that bridge (you can see it in the ovs-vsctl show output, as eg "Port br-int, Interface br-int, type: internal". Because the openflow rules dictate what ports packets are sent out of, they often aren't sent out of this port.