The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1865866 - 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 ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.13
Version: FDP 20.E
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: lorenzo bianconi
QA Contact: ying xu
URL:
Whiteboard:
Depends On:
Blocks: 1867013
TreeView+ depends on / blocked
 
Reported: 2020-08-04 12:18 UTC by ying xu
Modified: 2020-12-01 15:07 UTC (History)
5 users (show)

Fixed In Version: ovn2.13-20.09.0-3.el7fdn
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1867013 (view as bug list)
Environment:
Last Closed: 2020-12-01 15:07:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:5308 0 None None None 2020-12-01 15:07:50 UTC

Description ying xu 2020-08-04 12:18:33 UTC
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:

Comment 1 ying xu 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 6 ying xu 2020-11-06 05:24:10 UTC
I run the case on the latest version:
# rpm -qa|grep ovn
ovn2.13-host-20.09.0-9.el8fdp.x86_64
ovn2.13-20.09.0-9.el8fdp.x86_64
ovn2.13-central-20.09.0-9.el8fdp.x86_64

:: [ 23:02:37 ] :: [  BEGIN   ] :: Running 'ovn-nbctl list logical-switch-port|grep 42.42.42.127'
dynamic_addresses   : "00:de:ad:01:02:79 42.42.42.127"
:: [ 23:02:37 ] :: [   PASS   ] :: Command 'ovn-nbctl list logical-switch-port|grep 42.42.42.127' (Expected 0, got 0)
:: [ 23:02:37 ] :: [  BEGIN   ] :: Running 'ovn-nbctl list logical-switch-port|grep 42.42.42.128'
dynamic_addresses   : "00:de:ad:01:00:55 42.42.42.128"
:: [ 23:02:37 ] :: [   PASS   ] :: Command 'ovn-nbctl list logical-switch-port|grep 42.42.42.128' (Expected 0, got 0)
:: [ 23:02:47 ] :: [  BEGIN   ] :: Running 'ovn-nbctl list logical-switch-port|grep 42.42.42.127'
:: [ 23:02:47 ] :: [   PASS   ] :: Command 'ovn-nbctl list logical-switch-port|grep 42.42.42.127' (Expected 1, got 1)
:: [ 23:02:47 ] :: [  BEGIN   ] :: Running 'ovn-nbctl list logical-switch-port|grep 42.42.42.128'
:: [ 23:02:47 ] :: [   PASS   ] :: Command 'ovn-nbctl list logical-switch-port|grep 42.42.42.128' (Expected 1, got 1)

job log on rhel8:
https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2020/11/47064/4706464/9019193/117359386/taskout.log

job log on rhel7:
https://beaker.engineering.redhat.com/recipes/9019916/tasks/117365782/logs/taskout.log

Comment 8 errata-xmlrpc 2020-12-01 15:07:02 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 (ovn2.13 bug fix and enhancement update), 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-2020:5308


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