+++ 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"
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'.