The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1867013 - if set the lsp-addresses dynamic,the ip distributed was wrong when the subnet mask is set to CIDR
Summary: if set the lsp-addresses dynamic,the ip distributed was wrong when the subnet...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.11
Version: FDP 20.E
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: OVN Team
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On: 1865866
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-07 06:59 UTC by ying xu
Modified: 2024-02-14 21:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1865866
Environment:
Last Closed: 2024-02-14 21:11:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-809 0 None None None 2024-02-14 21:14:33 UTC

Description ying xu 2020-08-07 06:59:06 UTC
+++ This bug was initially created as a clone of Bug #1865866 +++

Description of problem:
if set the lsp-addresses dynamic,the ip distributed was wrong when the subnet mask is set to CIDR
that means when I config 
ovn-nbctl lsp-set-addresses vm1 "00:de:ad:01:00:01 dynamic"

and set the ls subnet which netmask is not 8/16/24,like below,
ovn-nbctl set logical_switch s1 other_config:subnet=42.42.42.0/25

the ip for the dynamic_addresses may get "42.42.42.127" or "42.42.42.128"

but 42.42.42.128 is not belong to the subnet 42.42.42.0/25,and 42.42.42.127 can't be assign to a port as it is the broadcast ip for this subnet.

Version-Release number of selected component (if applicable):
# rpm -qa|grep ovn
ovn2.13-20.06.1-6.el8fdp.x86_64
ovn2.13-host-20.06.1-6.el8fdp.x86_64
ovn2.13-central-20.06.1-6.el8fdp.x86_64

How reproducible:
always

Steps to Reproduce:
ovn-nbctl ls-add s1
i=1
for m in `seq 0 4`;do
                for n in `seq 1 99`;do
                ovn-nbctl lsp-add s1 vm$i
                ovn-nbctl lsp-set-addresses vm$i "00:de:ad:01:$m:$n dynamic"

                let i++
                if [ $i -gt 200 ];then
                        break;
                fi
                done
                if [ $i -gt 200 ];then
                        break;
                fi
        done
ovn-nbctl set logical_switch s1 other_config:subnet=42.42.42.0/25
Actual results:

# ovn-nbctl list logical-switch-port|grep 42.42.42.128\"
dynamic_addresses   : "00:de:ad:01:02:31 42.42.42.128"
# ovn-nbctl list logical-switch-port|grep 42.42.42.127\"
dynamic_addresses   : "00:de:ad:01:00:65 42.42.42.127"

Expected results:
these two ip should not be distributed to the port

Additional info:

--- Additional comment from ying xu on 2020-08-05 03:05:57 UTC ---

try to reproduce this issue,you should change the subnet config.
based on the env in the description,you should config "ovn-nbctl set logical_switch s1 other_config:subnet=42.42.42.0/24" first,and the dynamic addresses are correct.
#ovn-nbctl list logical-switch-port|grep 42.42.42.127
#
#ovn-nbctl list logical-switch-port|grep 42.42.42.128
#

then, change the config "ovn-nbctl set logical_switch s1 other_config:subnet=42.42.42.0/25",now you can see the wrong results.
#ovn-nbctl list logical-switch-port|grep 42.42.42.127
#dynamic_addresses   : "00:de:ad:01:00:56 42.42.42.127"
#ovn-nbctl list logical-switch-port|grep 42.42.42.128
#dynamic_addresses   : "00:de:ad:01:00:77 42.42.42.128"

Comment 1 OVN Bot 2024-02-14 21:11:10 UTC
This issue is being closed as an automatic process due to the issue's age. If you wish to re-open this issue, please do so in Jira (https://issues.redhat.com) in the 'FDP' project. Please be sure to set the component to the latest OVN version where this issue is known to occur. If this is a feature request or improvement, please set the component to 'OVN'.


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