[ovn] If dhcp port is deleted from neutron, it is never recreated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Brian Haley | ||
neutron (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This is happening in charmed OpenStack yoga/stable using ovn 22.03.
Neutron version is 2:20.2.0-0ubuntu1
If the dhcp port of a subnet is deleted via OpenStack API, this will never be recreated even toggling the dhcp on the subnet with:
openstack subnet set --no-dhcp/--dhcp <uuid>
This will cause also a missing route for metadata in OVN DHCP_Options:
i.e.
_uuid : 2d4871f5-
cidr : "192.168.100.0/24"
external_ids : {"neutron:
options : {dns_server=
Note the missing classless_
Even if the dhcp port is then recreated manually with device-id ovnmeta-<net-uuid> and device-owner network:
The routes will appear again in OVN DHCP_Options table only when updating the subnet host-routes with:
openstack subnet set --host-route destination=
Changed in neutron: | |
assignee: | nobody → Brian Haley (brian-haley) |
importance: | Undecided → Medium |
tags: | added: ovn |
Changed in neutron: | |
status: | New → Confirmed |
summary: |
- If dhcp port is deleted from neutron, it is never recreated + [ovn] If dhcp port is deleted from neutron, it is never recreated |
tags: | added: antelope-backport-potential |
I added neutron to this bug since it seems like there is a difference between ML2/OVS and OVN when it comes to disabling/enabling dhcp on a subnet.
$ openstack port list --fixed-ip subnet= 8dc6fc50- 7ea1-4165- b8f7-50c331f160 60 --device-owner network:dhcp
| 3b0180c8- cee0-445e- 937e-ce22c36504 22 | | fa:16:3e:2b:94:5d | ip_address= '10.0.0. 2', subnet_ id='8dc6fc50- 7ea1-4165- b8f7-50c331f160 60'
$ openstack subnet set --no-dhcp 8dc6fc50- 7ea1-4165- b8f7-50c331f160 60 8dc6fc50- 7ea1-4165- b8f7-50c331f160 60 --device-owner network:dhcp
$ openstack port list --fixed-ip subnet=
<nothing>
$ openstack subnet set --dhcp 8dc6fc50- 7ea1-4165- b8f7-50c331f160 60 x-2204: ~/devstack$ openstack port list --fixed-ip subnet= 8dc6fc50- 7ea1-4165- b8f7-50c331f160 60 --device-owner network:dhcp
stack@virtualbo
| 3b0180c8- cee0-445e- 937e-ce22c36504 22 | | fa:16:3e:2b:94:5d | ip_address= '10.0.0. 2', subnet_ id='8dc6fc50- 7ea1-4165- b8f7-50c331f160 60'
So it was deleted and re-created.
It actually is a very simple change to the OVN code to even *try* to recreate the OVN port, worked with a quick test, so I'll propose a change to neutron for it.