Description of problem: extra-dhcp-option classless-static-route is not working properly. It sets the value in the SBDB without {} and overrides default routes. Version-Release number of selected component (if applicable): Red Hat Openstack Platform 16 (RHOSP16) Red Hat Openstack Platform 17 (RHOSP17) Steps to Reproduce: 1. after port creation: ~~~ ovn-sbctl --db=$SBDB find logical_flow external_ids:stage-name=ls_in_dhcp_options | grep -B 2 -A 6 192.168.210.114 _uuid : 57c306d2-5e5b-460b-b314-9e581bb44e12 actions : "reg0[3] = put_dhcp_opts(offerip = 192.168.210.114, classless_static_route = {169.254.169.254/32,192.168.210.100, 0.0.0.0/0,192.168.210.1}, dns_server = {172.16.0.1, 10.0.0.1}, lease_time = 43200, mtu = 1442, netmask = 255.255.255.0, router = 192.168.210.1, server_id = 192.168.210.1); next;" -- _uuid : cbe4a7b9-6536-4a28-833c-b941eecd7886 actions : "reg0[3] = put_dhcp_opts(offerip = 192.168.210.114, classless_static_route = {169.254.169.254/32,192.168.210.100, 0.0.0.0/0,192.168.210.1}, dns_server = {172.16.0.1, 10.0.0.1}, lease_time = 43200, mtu = 1442, netmask = 255.255.255.0, router = 192.168.210.1, server_id = 192.168.210.1); next;" ~~~ 2. then if we set a set static route: ~~~ openstack port set --extra-dhcp-option name=classless-static-route,value=128.128.128.128/32,22.2.0.2,ip-version=4 a02943c7-6761-43ed-bcfd-2ac01afd2cb8 ~~~ 3. We will lose the default static route and it creates a syntax error because remove the {} ~~~ [root@compute-1 /]# ovn-sbctl --db=$SBDB find logical_flow external_ids:stage-name=ls_in_dhcp_options | grep -B 2 -A 6 192.168.210.114 _uuid : 8ead0f38-60fa-4d4e-88d1-63c39a03563f actions : "reg0[3] = put_dhcp_opts(offerip = 192.168.210.114, classless_static_route = 128.128.128.128/32,22.2.0.2, dns_server = {172.16.0.1, 10.0.0.1}, lease_time = 43200, mtu = 1442, netmask = 255.255.255.0, router = 192.168.210.1, server_id = 192.168.210.1); next;" -- _uuid : 36084950-18f7-4c41-9142-e34abdae4094 actions : "reg0[3] = put_dhcp_opts(offerip = 192.168.210.114, classless_static_route = 128.128.128.128/32,22.2.0.2, dns_server = {172.16.0.1, 10.0.0.1}, lease_time = 43200, mtu = 1442, netmask = 255.255.255.0, router = 192.168.210.1, server_id = 192.168.210.1); next;" ~~~ 4. we can see the syntax error in the logs: ~~~ 2024-05-27T08:53:12.951Z|328987|lflow|WARN|error parsing actions "reg0[3] = put_dhcp_opts(offerip = 192.168.210.114, classless_static_route = 128.128.128.128/32,22.2.0.2, dns_server = {192.168.210.212, 192.168.210.213}, lease_time = 43200, mtu = 1500, netmask = 255.255.255.0, router = 192.168.210.1, server_id = 192.168.210.1, tftp_server_address = 10.0.0.1); next;": Syntax error at `22.2.0.2'. ~~~ Actual results: extra-dhcp-option classless-static-route is not working Expected results: extra-dhcp-option classless-static-route should add the new static route at the end. Additiona info: as a Workaround I pass the static route with the default one in the {}, something like: ~~~ openstack port set --extra-dhcp-option name=classless-static-route,value="{169.254.169.254/32,192.168.210.100,0.0.0.0/0,192.168.210.1,128.128.128.128/32,22.2.0.2},ip-version=4" a02943c7-6761-43ed-bcfd-2ac01afd2cb8 ~~~
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (RHOSP 17.1.4 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2024:9974