Bug 2283515 - [RHOSP16][RHOSP17][OVN] extra-dhcp-option classless-static-route is not working
Summary: [RHOSP16][RHOSP17][OVN] extra-dhcp-option classless-static-route is not working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 16.2 (Train)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z4
: 17.1
Assignee: Lucas Alvares Gomes
QA Contact: Bharath M V
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-27 15:12 UTC by Luigi Tamagnone
Modified: 2024-11-21 09:40 UTC (History)
7 users (show)

Fixed In Version: openstack-neutron-18.6.1-17.1.20240918120815.85ff760.el9ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-11-21 09:40:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 922119 0 None NEW [OVN] Sanitize the classless-static-route DHCP option 2024-06-17 14:44:36 UTC
Red Hat Issue Tracker OSP-32165 0 None None None 2024-05-27 15:15:01 UTC
Red Hat Product Errata RHBA-2024:9974 0 None None None 2024-11-21 09:40:42 UTC

Description Luigi Tamagnone 2024-05-27 15:12:43 UTC
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
~~~

Comment 20 errata-xmlrpc 2024-11-21 09:40:40 UTC
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


Note You need to log in before you can comment on or make changes to this bug.