The static route removes the local route from qrouter-namespace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Invalid
|
Medium
|
Unassigned |
Bug Description
The static route removes the local route from qrouter-namespace routing table.
I created two networks with subnet:
First:
#openstack network create Network-1 -f value -c id
784615c9-
#openstack subnet create sub-v4 --network 784615c9-
0f1f9cfd-
Second:
#openstack network create Network-2 -f value -c id
041011cc-
#openstack subnet create sub-v4 --network 041011cc-
3a500e8f-
Create router:
openstack router create Router-Openstack -f value -c id
3d9e5161-
Added subnet to router:
#openstack router add subnet 3d9e5161-
#openstack router add subnet 3d9e5161-
I now have a router with two interfaces.
#openstack router show 3d9e5161-
+------
| Field | Value |
+------
| admin_state_up | UP |
| availability_
| availability_zones | AZ1, AZ2, AZ3 |
| created_at | 2022-12-
| description | |
| external_
| flavor_id | None |
| id | 3d9e5161-
| interfaces_info | [{"port_id": "10db0b0e-
| location | Munch({'cloud': '', 'region_name': 'PL', 'zone': None, 'project': Munch({'id': 'afdfb965515f47
| name | Router-Openstack |
| project_id | afdfb965515f472
| revision_number | 8 |
| routes | |
| status | ACTIVE |
| tags | |
| updated_at | 2022-12-
+------
Routing table from qrouter:
neutron-01:~# ip netns exec qrouter-
169.254.0.0/24 dev ha-c5a65a6e-92 proto kernel scope link src 169.254.0.82
169.254.192.0/18 dev ha-c5a65a6e-92 proto kernel scope link src 169.254.193.48
172.16.0.0/24 dev qr-99dc5f15-15 proto kernel scope link src 172.16.0.1
192.168.0.0/24 dev qr-10db0b0e-7f proto kernel scope link src 192.168.0.1
I added new static route.
#openstack router set 3d9e5161-
#openstack router show 3d9e5161-
+------
| Field | Value |
+------
| routes | destination=
+------
Routing table from qrouter:
neutron-01:~# ip netns exec qrouter-
169.254.0.0/24 dev ha-c5a65a6e-92 proto kernel scope link src 169.254.0.82
169.254.192.0/18 dev ha-c5a65a6e-92 proto kernel scope link src 169.254.193.48
172.16.0.0/24 dev qr-99dc5f15-15 proto kernel scope link src 172.16.0.1
192.168.0.0/24 via 172.16.0.10 dev qr-99dc5f15-15 proto 112 <----- my static route
192.168.0.0/24 via 172.16.0.10 dev qr-99dc5f15-15 <----- my static route 2x? why 2x?
In this moment I removed wrong route:
#openstack router remove route 3d9e5161-
+------
| Field | Value |
+------
| admin_state_up | UP |
| availability_
| availability_zones | AZ1, AZ2, AZ3 |
| created_at | 2022-12-
| description | |
| distributed | False |
| external_
| flavor_id | None |
| ha | True |
| id | 3d9e5161-
| location | Munch({'cloud': '', 'region_name': 'PL', 'zone': None, 'project': Munch({'id': 'afdfb965515f47
| name | Router-Openstack |
| project_id | afdfb965515f472
| revision_number | 10 |
| routes | |
| status | ACTIVE |
| tags | |
| updated_at | 2022-12-
+------
Routing table after removing the static route:
neutron-01:~# ip netns exec qrouter-
169.254.0.0/24 dev ha-c5a65a6e-92 proto kernel scope link src 169.254.0.82
169.254.192.0/18 dev ha-c5a65a6e-92 proto kernel scope link src 169.254.193.48
172.16.0.0/24 dev qr-99dc5f15-15 proto kernel scope link src 172.16.0.1
192.168.0.0/24 via 172.16.0.10 dev qr-99dc5f15-15 <--------------- the route is still present
#openstack router show 3d9e5161-
+--------+-------+
| Field | Value |
+--------+-------+
| routes | |
+--------+-------+
Why is it still showing the wrong entry in the routing table and the local route is missing?
I believe that after deleting the route, the routing entry should look like below:
192.168.0.0/24 dev qr-10db0b0e-7f proto kernel scope link src 192.168.0.1
Does anyone know how to solve this problem?
My software version:
neutron-01:~# dpkg -l | grep neutron | grep ii
ii neutron-bgp-dragent 2:16.0.
ii neutron-common 2:16.4.2-0ubuntu2 all Neutron is a virtual network service for Openstack - common
ii neutron-dhcp-agent 2:16.4.2-0ubuntu2 all Neutron is a virtual network service for Openstack - DHCP agent
ii neutron-
ii neutron-
ii neutron-l3-agent 2:16.4.2-0ubuntu2 all Neutron is a virtual network service for Openstack - l3 agent
ii neutron-
ii neutron-
ii neutron-plugin-ml2 2:16.4.2-0ubuntu2 all Neutron is a virtual network service for Openstack - ML2 plugin
ii neutron-server 2:16.4.2-0ubuntu2 all Neutron is a virtual network service for Openstack - server
ii neutron-
ii python3-neutron 2:16.4.2-0ubuntu2 all Neutron is a virtual network service for Openstack - Python library
ii python3-
ii python3-
ii python3-neutron-lib 2.3.0-0ubuntu1 all Neutron shared routines and utilities - Python 3.x
ii python3-
ii python3-
neutron-01:~# uname -a
Linux neutron-01 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
neutron-01:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
description: | updated |
tags: | added: l3-dvr-backlog |
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
I can confirm that adding/removing a route that is the same as the subnet of the attached router interface can cause issues. I saw something different than described in that I didn't see a duplicate route, but in the end I was left without my interface route.
For example...
# Added second subnet and interface on router, 10.0.0.64/26 here:
default via 172.24.4.1 dev qg-ae7b835f-4a proto static
10.0.0.0/26 dev qr-648ebb56-c3 proto kernel scope link src 10.0.0.1
10.0.0.64/26 dev qr-c052ba70-be proto kernel scope link src 10.0.0.65
172.24.4.0/24 dev qg-ae7b835f-4a proto kernel scope link src 172.24.4.209
# Added route, which removed existing interface route 10.0.0. 64/26,gateway= 10.0.0. 10
$ openstack router set router1 --route destination=
default via 172.24.4.1 dev qg-ae7b835f-4a proto static
10.0.0.0/26 dev qr-648ebb56-c3 proto kernel scope link src 10.0.0.1
10.0.0.64/26 via 10.0.0.10 dev qr-648ebb56-c3 proto static
172.24.4.0/24 dev qg-ae7b835f-4a proto kernel scope link src 172.24.4.209
# Removed route, so router still has interface, but no route to the local subnet 10.0.0. 64/26,gateway= 10.0.0. 10
$ openstack router remove route router1 --route destination=
default via 172.24.4.1 dev qg-ae7b835f-4a proto static
10.0.0.0/26 dev qr-648ebb56-c3 proto kernel scope link src 10.0.0.1
172.24.4.0/24 dev qg-ae7b835f-4a proto kernel scope link src 172.24.4.209