Comment 5 for bug 1946325

Revision history for this message
Hemanth Nakkina (hemanth-n) wrote (last edit ):

Analysis so far:

dhcpv4-options are not set on the LSP if the device_owner has prefix "neutron:".

Please see the following code to confirm the above statement
https://opendev.org/openstack/neutron/src/branch/stable/xena/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L185-L189
https://opendev.org/openstack/neutron/src/branch/master/neutron/common/ovn/utils.py#L163-L169
https://opendev.org/openstack/neutron/src/branch/master/neutron/common/ovn/utils.py#L125-L127

Charm octavia sets device_owner as neutron:LOADBALANCERV2
https://opendev.org/openstack/charm-octavia/src/branch/master/src/lib/charm/openstack/api_crud.py#L362

I confirmed this theory by creating port manually and looking at ovs-sbctl lflow-list

I see the following entries if i create port manually with device_owner not started with neutron:

OpenStack command:
openstack port create --network lb-mgmt-net --device-owner Octavia:LOADBALANCERV2 --security-group fe575293-a434-48fd-9b06-74770cab1a6f testoctavia4

SB Flows:
table=17(ls_in_dhcp_options ), priority=100 , match=(inport == "74afdfcd-7291-476f-bfae-877264cc0b61" && eth.src == fa:16:3e:db:75:61 && ip4.src == 0.0.0.0 && ip4.dst == 255.255.255.255 && udp.src == 68 && udp.dst == 67), action=(reg0[3] = put_dhcp_opts(offerip = 10.100.0.233, classless_static_route = {169.254.169.254/32,10.100.0.2, 0.0.0.0/0,10.100.0.1}, dns_server = {10.5.0.2}, domain_name = "octaviaovn.stsstack.qa.1ss.", lease_time = 43200, mtu = 1492, netmask = 255.255.255.0, router = 10.100.0.1, server_id = 10.100.0.1); next;)
table=17(ls_in_dhcp_options ), priority=100 , match=(inport == "74afdfcd-7291-476f-bfae-877264cc0b61" && eth.src == fa:16:3e:db:75:61 && ip4.src == 10.100.0.233 && ip4.dst == {10.100.0.1, 255.255.255.255} && udp.src == 68 && udp.dst == 67), action=(reg0[3] = put_dhcp_opts(offerip = 10.100.0.233, classless_static_route = {169.254.169.254/32,10.100.0.2, 0.0.0.0/0,10.100.0.1}, dns_server = {10.5.0.2}, domain_name = "octaviaovn.stsstack.qa.1ss.", lease_time = 43200, mtu = 1492, netmask = 255.255.255.0, router = 10.100.0.1, server_id = 10.100.0.1); next;)

Where as when i create a port using below command, I dont see above flows.
openstack port create --network lb-mgmt-net --device-owner neutron:LOADBALANCERV2 --security-group fe575293-a434-48fd-9b06-74770cab1a6f testoctavia5

Devstack uses Octavia:health-mgr as device_owner to create o-hm0 port.
https://github.com/openstack/octavia/blob/master/devstack/plugin.sh#L469

Please note this issue only occurs if LB Mgmt network is IPv4. I am going to go backwards and see in which release the problem started.