← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1998952] [NEW] The static route removes the local route from qrouter-namespace

 

Public bug reported:

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-f9c4-4f4e-87d8-7e5dc76fde5e

#openstack subnet create sub-v4 --network 784615c9-f9c4-4f4e-87d8-7e5dc76fde5e --subnet-range 192.168.0.0/24  -f value -c id
0f1f9cfd-0956-46bd-9bcc-c6eca6fa522b

Second:

#openstack network create Network-2 -f value -c id
041011cc-e254-4326-afa7-9951686610fc

#openstack subnet create sub-v4 --network 041011cc-e254-4326-afa7-9951686610fc --subnet-range 172.16.0.0/24  -f value -c id
3a500e8f-9ef8-48de-a148-623d7fa8e580

Create router:

openstack router create Router-Openstack  -f value -c id
3d9e5161-0c19-4bcd-abb8-9350bfcefb56

Added subnet to router:

#openstack router add subnet  3d9e5161-0c19-4bcd-abb8-9350bfcefb56 0f1f9cfd-0956-46bd-9bcc-c6eca6fa522b
#openstack router add subnet  3d9e5161-0c19-4bcd-abb8-9350bfcefb56 3a500e8f-9ef8-48de-a148-623d7fa8e580

I now have a router with two interfaces.

#openstack router show 3d9e5161-0c19-4bcd-abb8-9350bfcefb56
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                   | Value                                                                                                                                                                                                                                                                         |
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up          | UP                                                                                                                                                                                                                                                                            |
| availability_zone_hints |                                                                                                                                                                                                                                                                               |
| availability_zones      | AZ1, AZ2, AZ3                                                                                                                                                                                                                                                                 |
| created_at              | 2022-12-06T16:35:59Z                                                                                                                                                                                                                                                          |
| description             |                                                                                                                                                                                                                                                                               |
| external_gateway_info   | null                                                                                                                                                                                                                                                                          |
| flavor_id               | None                                                                                                                                                                                                                                                                          |
| id                      | 3d9e5161-0c19-4bcd-abb8-9350bfcefb56                                                                                                                                                                                                                                          |
| interfaces_info         | [{"port_id": "10db0b0e-7f54-4927-b9ad-4a69515e069c", "ip_address": "192.168.0.1", "subnet_id": "0f1f9cfd-0956-46bd-9bcc-c6eca6fa522b"}, {"port_id": "99dc5f15-1569-46f3-9d4f-4b907d7ae8fe", "ip_address": "172.16.0.1", "subnet_id": "3a500e8f-9ef8-48de-a148-623d7fa8e580"}] |
| location                | Munch({'cloud': '', 'region_name': 'PL', 'zone': None, 'project': Munch({'id': 'afdfb965515f4724a21b6823764asdfg', 'name': 'myproject', 'domain_id': 'default', 'domain_name': None})})                                                                               |
| name                    | Router-Openstack                                                                                                                                                                                                                                                              |
| project_id              | afdfb965515f4724a21b6823764asdfg                                                                                                                                                                                                                                              |
| revision_number         | 8                                                                                                                                                                                                                                                                             |
| routes                  |                                                                                                                                                                                                                                                                               |
| status                  | ACTIVE                                                                                                                                                                                                                                                                        |
| tags                    |                                                                                                                                                                                                                                                                               |
| updated_at              | 2022-12-06T16:37:58Z                                                                                                                                                                                                                                                          |
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Routing table from qrouter:

neutron-01:~# ip netns exec qrouter-3d9e5161-0c19-4bcd-abb8-9350bfcefb56 ip route
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-0c19-4bcd-abb8-9350bfcefb56 --route
destination=192.168.0.0/24,gateway=172.16.0.10

#openstack router show 3d9e5161-0c19-4bcd-abb8-9350bfcefb56 -c routes
+--------+-----------------------------------------------------+
| Field  | Value                                               |
+--------+-----------------------------------------------------+
| routes | destination='192.168.0.0/24', gateway='172.16.0.10' |
+--------+-----------------------------------------------------+

Routing table from qrouter:

neutron-01:~# ip netns exec qrouter-3d9e5161-0c19-4bcd-abb8-9350bfcefb56 ip route
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-0c19-4bcd-abb8-9350bfcefb56 --route destination=192.168.0.0/24,gateway=172.16.0.10
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                   | Value                                                                                                                                                                                           |
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up          | UP                                                                                                                                                                                              |
| availability_zone_hints |                                                                                                                                                                                                 |
| availability_zones      | AZ1, AZ2, AZ3                                                                                                                                                                                   |
| created_at              | 2022-12-06T16:35:59Z                                                                                                                                                                            |
| description             |                                                                                                                                                                                                 |
| distributed             | False                                                                                                                                                                                           |
| external_gateway_info   | null                                                                                                                                                                                            |
| flavor_id               | None                                                                                                                                                                                            |
| ha                      | True                                                                                                                                                                                            |
| id                      | 3d9e5161-0c19-4bcd-abb8-9350bfcefb56                                                                                                                                                            |
| location                | Munch({'cloud': '', 'region_name': 'PL', 'zone': None, 'project': Munch({'id': 'afdfb965515f4724a21b6823764asdfg', 'name': 'myproject', 'domain_id': 'default', 'domain_name': None})}) |
| name                    | Router-Openstack                                                                                                                                                                                |
| project_id              | afdfb965515f4724a21b6823764asdfg                                                                                                                                                                |
| revision_number         | 10                                                                                                                                                                                              |
| routes                  |                                                                                                                                                                                                 |
| status                  | ACTIVE                                                                                                                                                                                          |
| tags                    |                                                                                                                                                                                                 |
| updated_at              | 2022-12-06T16:47:58Z                                                                                                                                                                            |
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Routing table after removing the static route:

neutron-01:~# ip netns exec qrouter-3d9e5161-0c19-4bcd-abb8-9350bfcefb56 ip route
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-0c19-4bcd-abb8-9350bfcefb56 -c routes
+--------+-------+
| 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.0-0ubuntu0.20.04.1             all          OpenStack Neutron Dynamic Routing - Agent
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-dynamic-routing-common         2:16.0.0-0ubuntu0.20.04.1             all          OpenStack Neutron Dynamic Routing - common files
ii  neutron-fwaas-common                   1:16.0.0-0ubuntu0.20.04.1             all          Firewall-as-a-Service driver for OpenStack Neutron
ii  neutron-l3-agent                       2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - l3 agent
ii  neutron-linuxbridge-agent              2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - linuxbridge agent
ii  neutron-metadata-agent                 2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - metadata agent
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-vpnaas-common                  2:16.0.0-0ubuntu0.20.04.1             all          VPN-as-a-Service driver for OpenStack Neutron
ii  python3-neutron                        2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - Python library
ii  python3-neutron-dynamic-routing        2:16.0.0-0ubuntu0.20.04.1             all          OpenStack Neutron Dynamic Routing - Python 3 library
ii  python3-neutron-fwaas                  1:16.0.0-0ubuntu0.20.04.1             all          Firewall-as-a-Service driver for OpenStack Neutron
ii  python3-neutron-lib                    2.3.0-0ubuntu1                        all          Neutron shared routines and utilities - Python 3.x
ii  python3-neutron-vpnaas                 2:16.0.0-0ubuntu0.20.04.1             all          VPN-as-a-Service driver for OpenStack Neutron
ii  python3-neutronclient                  1:7.1.1-0ubuntu1                      all          client API library for Neutron - Python 3.x

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

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1998952

Title:
  The static route removes the local route from qrouter-namespace

Status in neutron:
  New

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-f9c4-4f4e-87d8-7e5dc76fde5e

  #openstack subnet create sub-v4 --network 784615c9-f9c4-4f4e-87d8-7e5dc76fde5e --subnet-range 192.168.0.0/24  -f value -c id
  0f1f9cfd-0956-46bd-9bcc-c6eca6fa522b

  Second:

  #openstack network create Network-2 -f value -c id
  041011cc-e254-4326-afa7-9951686610fc

  #openstack subnet create sub-v4 --network 041011cc-e254-4326-afa7-9951686610fc --subnet-range 172.16.0.0/24  -f value -c id
  3a500e8f-9ef8-48de-a148-623d7fa8e580

  Create router:

  openstack router create Router-Openstack  -f value -c id
  3d9e5161-0c19-4bcd-abb8-9350bfcefb56

  Added subnet to router:

  #openstack router add subnet  3d9e5161-0c19-4bcd-abb8-9350bfcefb56 0f1f9cfd-0956-46bd-9bcc-c6eca6fa522b
  #openstack router add subnet  3d9e5161-0c19-4bcd-abb8-9350bfcefb56 3a500e8f-9ef8-48de-a148-623d7fa8e580

  I now have a router with two interfaces.

  #openstack router show 3d9e5161-0c19-4bcd-abb8-9350bfcefb56
  +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                   | Value                                                                                                                                                                                                                                                                         |
  +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | admin_state_up          | UP                                                                                                                                                                                                                                                                            |
  | availability_zone_hints |                                                                                                                                                                                                                                                                               |
  | availability_zones      | AZ1, AZ2, AZ3                                                                                                                                                                                                                                                                 |
  | created_at              | 2022-12-06T16:35:59Z                                                                                                                                                                                                                                                          |
  | description             |                                                                                                                                                                                                                                                                               |
  | external_gateway_info   | null                                                                                                                                                                                                                                                                          |
  | flavor_id               | None                                                                                                                                                                                                                                                                          |
  | id                      | 3d9e5161-0c19-4bcd-abb8-9350bfcefb56                                                                                                                                                                                                                                          |
  | interfaces_info         | [{"port_id": "10db0b0e-7f54-4927-b9ad-4a69515e069c", "ip_address": "192.168.0.1", "subnet_id": "0f1f9cfd-0956-46bd-9bcc-c6eca6fa522b"}, {"port_id": "99dc5f15-1569-46f3-9d4f-4b907d7ae8fe", "ip_address": "172.16.0.1", "subnet_id": "3a500e8f-9ef8-48de-a148-623d7fa8e580"}] |
  | location                | Munch({'cloud': '', 'region_name': 'PL', 'zone': None, 'project': Munch({'id': 'afdfb965515f4724a21b6823764asdfg', 'name': 'myproject', 'domain_id': 'default', 'domain_name': None})})                                                                               |
  | name                    | Router-Openstack                                                                                                                                                                                                                                                              |
  | project_id              | afdfb965515f4724a21b6823764asdfg                                                                                                                                                                                                                                              |
  | revision_number         | 8                                                                                                                                                                                                                                                                             |
  | routes                  |                                                                                                                                                                                                                                                                               |
  | status                  | ACTIVE                                                                                                                                                                                                                                                                        |
  | tags                    |                                                                                                                                                                                                                                                                               |
  | updated_at              | 2022-12-06T16:37:58Z                                                                                                                                                                                                                                                          |
  +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

  Routing table from qrouter:

  neutron-01:~# ip netns exec qrouter-3d9e5161-0c19-4bcd-abb8-9350bfcefb56 ip route
  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-0c19-4bcd-abb8-9350bfcefb56 --route
  destination=192.168.0.0/24,gateway=172.16.0.10

  #openstack router show 3d9e5161-0c19-4bcd-abb8-9350bfcefb56 -c routes
  +--------+-----------------------------------------------------+
  | Field  | Value                                               |
  +--------+-----------------------------------------------------+
  | routes | destination='192.168.0.0/24', gateway='172.16.0.10' |
  +--------+-----------------------------------------------------+

  Routing table from qrouter:

  neutron-01:~# ip netns exec qrouter-3d9e5161-0c19-4bcd-abb8-9350bfcefb56 ip route
  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-0c19-4bcd-abb8-9350bfcefb56 --route destination=192.168.0.0/24,gateway=172.16.0.10
  +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                   | Value                                                                                                                                                                                           |
  +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | admin_state_up          | UP                                                                                                                                                                                              |
  | availability_zone_hints |                                                                                                                                                                                                 |
  | availability_zones      | AZ1, AZ2, AZ3                                                                                                                                                                                   |
  | created_at              | 2022-12-06T16:35:59Z                                                                                                                                                                            |
  | description             |                                                                                                                                                                                                 |
  | distributed             | False                                                                                                                                                                                           |
  | external_gateway_info   | null                                                                                                                                                                                            |
  | flavor_id               | None                                                                                                                                                                                            |
  | ha                      | True                                                                                                                                                                                            |
  | id                      | 3d9e5161-0c19-4bcd-abb8-9350bfcefb56                                                                                                                                                            |
  | location                | Munch({'cloud': '', 'region_name': 'PL', 'zone': None, 'project': Munch({'id': 'afdfb965515f4724a21b6823764asdfg', 'name': 'myproject', 'domain_id': 'default', 'domain_name': None})}) |
  | name                    | Router-Openstack                                                                                                                                                                                |
  | project_id              | afdfb965515f4724a21b6823764asdfg                                                                                                                                                                |
  | revision_number         | 10                                                                                                                                                                                              |
  | routes                  |                                                                                                                                                                                                 |
  | status                  | ACTIVE                                                                                                                                                                                          |
  | tags                    |                                                                                                                                                                                                 |
  | updated_at              | 2022-12-06T16:47:58Z                                                                                                                                                                            |
  +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

  Routing table after removing the static route:

  neutron-01:~# ip netns exec qrouter-3d9e5161-0c19-4bcd-abb8-9350bfcefb56 ip route
  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-0c19-4bcd-abb8-9350bfcefb56 -c routes
  +--------+-------+
  | 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.0-0ubuntu0.20.04.1             all          OpenStack Neutron Dynamic Routing - Agent
  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-dynamic-routing-common         2:16.0.0-0ubuntu0.20.04.1             all          OpenStack Neutron Dynamic Routing - common files
  ii  neutron-fwaas-common                   1:16.0.0-0ubuntu0.20.04.1             all          Firewall-as-a-Service driver for OpenStack Neutron
  ii  neutron-l3-agent                       2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - l3 agent
  ii  neutron-linuxbridge-agent              2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - linuxbridge agent
  ii  neutron-metadata-agent                 2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - metadata agent
  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-vpnaas-common                  2:16.0.0-0ubuntu0.20.04.1             all          VPN-as-a-Service driver for OpenStack Neutron
  ii  python3-neutron                        2:16.4.2-0ubuntu2                     all          Neutron is a virtual network service for Openstack - Python library
  ii  python3-neutron-dynamic-routing        2:16.0.0-0ubuntu0.20.04.1             all          OpenStack Neutron Dynamic Routing - Python 3 library
  ii  python3-neutron-fwaas                  1:16.0.0-0ubuntu0.20.04.1             all          Firewall-as-a-Service driver for OpenStack Neutron
  ii  python3-neutron-lib                    2.3.0-0ubuntu1                        all          Neutron shared routines and utilities - Python 3.x
  ii  python3-neutron-vpnaas                 2:16.0.0-0ubuntu0.20.04.1             all          VPN-as-a-Service driver for OpenStack Neutron
  ii  python3-neutronclient                  1:7.1.1-0ubuntu1                      all          client API library for Neutron - Python 3.x

  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1998952/+subscriptions



Follow ups