Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 2028040

Summary: lsp-get-addresses should respect addresses of type "router"
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Surya Seetharaman <surya>
Component: OVNAssignee: lorenzo bianconi <lorenzo.bianconi>
Status: CLOSED CURRENTRELEASE QA Contact: Ehsan Elahi <eelahi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: FDP 21.CCC: ctrautma, jiji, jishi, lorenzo.bianconi, pdiak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-13 07:02:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Surya Seetharaman 2021-12-01 11:17:40 UTC
Description of problem:

Currently according to the `lsp-set-addresses` documentation, we can have addresses of type "router"/"unknown" i.e non-MAC addresses

       lsp-set-addresses port [address]...
              Sets the addresses associated with port to address. Each
              address should be one of the following:

              an Ethernet address, optionally followed by a space and
              one or more IP addresses
                     OVN delivers packets for the Ethernet address to
                     this port.

              unknown
                     OVN delivers unicast Ethernet packets whose
                     destination MAC address is not in any logical
                     port's addresses column to ports with address
                     unknown.

              dynamic
                     Use this keyword to make ovn-northd generate a
                     globally unique MAC address and choose an unused
                     IPv4 address with the logical port's subnet and
                     store them in the port's dynamic_addresses column.

              router Accepted only when the type of the logical switch
                     port is router. This indicates that the Ethernet,
                     IPv4, and IPv6 addresses for this logical switch
                     port should be obtained from the connected logical
                     router port, as specified by router-port in
                     lsp-set-options.

However, lsp-get-addresses is not smart enough to parse an address of type "router" and translate it to the MAC address using the "router-port" field in the options map of the switch port.

lsp-get-addresses port
              Lists all the addresses associated with port on standard
              output, one per line.



Version-Release number of selected component (if applicable):
21.09.0-3.fc33

How reproducible:
Always


Steps to Reproduce:
1. Create a logical switch port connecting the router and switch, example:

sh-5.1# ovn-nbctl find logical_switch_port name=stor-ovn-worker2
_uuid               : d9d0a582-1888-4dc9-ab8d-c8abbbec25aa
addresses           : [router]
dhcpv4_options      : []
dhcpv6_options      : []
dynamic_addresses   : []
enabled             : []
external_ids        : {}
ha_chassis_group    : []
name                : stor-ovn-worker2
options             : {router-port=rtos-ovn-worker2}
parent_name         : []
port_security       : []
tag                 : []
tag_request         : []
type                : router
up                  : true

2. Run lsp-get-addresses

sh-5.1# ovn-nbctl lsp-get-addresses stor-ovn-worker2
router


Actual results:
Output is the constant "router"

Expected results:
Output should be lsp.options["router-port"].addresses

Application in OVN-K:
Before we used to explicitly set the MAC address on the stor-<nodename> port. Since https://github.com/ovn-org/ovn-kubernetes/commit/dbc769b5b285f7b2391f02ec01425715935b1e13, we started creating the ports with address "router". Hence doing a lsp-get-addresses on the switch-to-router ports don't yield the expected result.

Comment 2 lorenzo bianconi 2022-02-11 18:23:47 UTC
the patch has been applied upstream and it will be available d/s in 22.03 release