High level description:
If a neutron router is connected to a provider network 'A' and private geneve networks changing the provider network MTU does not always update router port gateway_mtu option even if provider network has MTU smaller than the private network.
stack@devstack:~/devstack$ openstack router show r1 -c id -f value
610f7fcb-40c2-4221-b535-8f5548de6fa5
stack@devstack:~/devstack$ openstack port list --device-id=610f7fcb-40c2-4221-b535-8f5548de6fa5 --device-owner=network:router_gateway -c ID -f value
c765a42c-9736-45b8-a2c9-c362bc221119
stack@devstack:~/devstack$ openstack network show net1 -c mtu -f value
1372
stack@devstack:~/devstack$ openstack network show public -c mtu -f value
1330
stack@devstack:~/devstack$ sudo ovn-nbctl --db=unix:/usr/local/var/run/ovn/ovnnb_db.sock get logical_router_port lrp-c765a42c-9736-45b8-a2c9-c362bc221119 options:gateway_mtu
"1330"
i.e. Private network has bigger mtu than the public one so the case described in https://bugs.launchpad.net/neutron/+bug/1951559 is not relevant and gateway_mtu option is expected to be updated after public mtu change
stack@devstack:~/devstack$ openstack network set --mtu 1300 public
stack@devstack:~/devstack$ openstack network show public -c mtu -f value
1300
stack@devstack:~/devstack$ sudo ovn-nbctl --db=unix:/usr/local/var/run/ovn/ovnnb_db.sock get logical_router_port lrp-c765a42c-9736-45b8-a2c9-c362bc221119 options:gateway_mtu
"1330"
stack@devstack:~/devstack$ date
Wed Apr 10 14:46:32 UTC 2024
stack@devstack:~/devstack$ sudo ovn-nbctl --db=unix:/usr/local/var/run/ovn/ovnnb_db.sock get logical_router_port lrp-c765a42c-9736-45b8-a2c9-c362bc221119 options:gateway_mtu
"1330"
Wed Apr 10 14:50:04 UTC 2024
stack@devstack:~/devstack$ sudo ovn-nbctl --db=unix:/usr/local/var/run/ovn/ovnnb_db.sock get logical_router_port lrp-c765a42c-9736-45b8-a2c9-c362bc221119 options:gateway_mtu
"1330"
stack@devstack:~/devstack$ openstack network show public -c mtu -f value
1300
Wed Apr 10 14:54:25 UTC 2024
stack@devstack:~/devstack$ openstack network show public -c mtu -f value
1300
stack@devstack:~/devstack$ sudo ovn-nbctl --db=unix:/usr/local/var/run/ovn/ovnnb_db.sock get logical_router_port lrp-c765a42c-9736-45b8-a2c9-c362bc221119 options:gateway_mtu
"1330"
stack@devstack:~/devstack$ date
Wed Apr 10 14:57:30 UTC 2024
stack@devstack:~/devstack$ sudo ovn-nbctl --db=unix:/usr/local/var/run/ovn/ovnnb_db.sock get logical_router_port lrp-c765a42c-9736-45b8-a2c9-c362bc221119 options:gateway_mtu
"1330"
stack@devstack:~/devstack$ date
Wed Apr 10 15:13:36 UTC 2024
stack@devstack:~/devstack$ sudo ovn-nbctl --db=unix:/usr/local/var/run/ovn/ovnnb_db.sock get logical_router_port lrp-c765a42c-9736-45b8-a2c9-c362bc221119 options:gateway_mtu
"1330"
i.e. Router port gateway_mtu option remains unchanged for a long time after value in neutron db has been changed.
Found on master devstack deployed on ubuntu-jammy.
High level description:
If a neutron router is connected to a provider network 'A' and private geneve networks changing the provider network MTU does not always update router port gateway_mtu option even if provider network has MTU smaller than the private network.
Reproduction scenario:
openstack router create r1
openstack router set --external-gateway public r1
openstack network create net1
openstack subnet create --subnet-range 192.168.100.0/24 --network net1 subnet1
openstack router add subnet r1 subnet1
stack@devstack: ~/devstack$ openstack router show r1 -c id -f value 40c2-4221- b535-8f5548de6f a5 ~/devstack$ openstack port list --device- id=610f7fcb- 40c2-4221- b535-8f5548de6f a5 --device- owner=network: router_ gateway -c ID -f value 9736-45b8- a2c9-c362bc2211 19
610f7fcb-
stack@devstack:
c765a42c-
stack@devstack: ~/devstack$ openstack network show net1 -c mtu -f value ~/devstack$ openstack network show public -c mtu -f value ~/devstack$ sudo ovn-nbctl --db=unix: /usr/local/ var/run/ ovn/ovnnb_ db.sock get logical_router_port lrp-c765a42c- 9736-45b8- a2c9-c362bc2211 19 options:gateway_mtu
1372
stack@devstack:
1330
stack@devstack:
"1330"
i.e. Private network has bigger mtu than the public one so the case described in https:/ /bugs.launchpad .net/neutron/ +bug/1951559 is not relevant and gateway_mtu option is expected to be updated after public mtu change
stack@devstack: ~/devstack$ openstack network set --mtu 1300 public ~/devstack$ openstack network show public -c mtu -f value ~/devstack$ sudo ovn-nbctl --db=unix: /usr/local/ var/run/ ovn/ovnnb_ db.sock get logical_router_port lrp-c765a42c- 9736-45b8- a2c9-c362bc2211 19 options:gateway_mtu ~/devstack$ date ~/devstack$ sudo ovn-nbctl --db=unix: /usr/local/ var/run/ ovn/ovnnb_ db.sock get logical_router_port lrp-c765a42c- 9736-45b8- a2c9-c362bc2211 19 options:gateway_mtu ~/devstack$ sudo ovn-nbctl --db=unix: /usr/local/ var/run/ ovn/ovnnb_ db.sock get logical_router_port lrp-c765a42c- 9736-45b8- a2c9-c362bc2211 19 options:gateway_mtu ~/devstack$ openstack network show public -c mtu -f value ~/devstack$ openstack network show public -c mtu -f value ~/devstack$ sudo ovn-nbctl --db=unix: /usr/local/ var/run/ ovn/ovnnb_ db.sock get logical_router_port lrp-c765a42c- 9736-45b8- a2c9-c362bc2211 19 options:gateway_mtu ~/devstack$ date ~/devstack$ sudo ovn-nbctl --db=unix: /usr/local/ var/run/ ovn/ovnnb_ db.sock get logical_router_port lrp-c765a42c- 9736-45b8- a2c9-c362bc2211 19 options:gateway_mtu ~/devstack$ date ~/devstack$ sudo ovn-nbctl --db=unix: /usr/local/ var/run/ ovn/ovnnb_ db.sock get logical_router_port lrp-c765a42c- 9736-45b8- a2c9-c362bc2211 19 options:gateway_mtu
stack@devstack:
1300
stack@devstack:
"1330"
stack@devstack:
Wed Apr 10 14:46:32 UTC 2024
stack@devstack:
"1330"
Wed Apr 10 14:50:04 UTC 2024
stack@devstack:
"1330"
stack@devstack:
1300
Wed Apr 10 14:54:25 UTC 2024
stack@devstack:
1300
stack@devstack:
"1330"
stack@devstack:
Wed Apr 10 14:57:30 UTC 2024
stack@devstack:
"1330"
stack@devstack:
Wed Apr 10 15:13:36 UTC 2024
stack@devstack:
"1330"
i.e. Router port gateway_mtu option remains unchanged for a long time after value in neutron db has been changed.
Found on master devstack deployed on ubuntu-jammy.