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 1825701

Summary: [ovn2.11]dynamic ipv4 address assignment is not as expected
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Jianlin Shi <jishi>
Component: ovn2.11Assignee: lorenzo bianconi <lorenzo.bianconi>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: medium Docs Contact:
Priority: medium    
Version: FDP 20.CCC: ctrautma, jishi, lorenzo.bianconi, mmichels, ralongi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn2.11-2.11.1-53.el7fdn Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1823287 Environment:
Last Closed: 2020-08-18 11:23:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1823287    
Bug Blocks:    

Description Jianlin Shi 2020-04-20 01:15:23 UTC
following issue also exists on ovn2.11-2.11.1-39.el8fdp.x86_64:

+++ This bug was initially created as a clone of Bug #1823287 +++

Description of problem:
dynamic ipv4 address assignment is not as expected

Version-Release number of selected component (if applicable):
ovn2.13-2.13.0-11

How reproducible:
always

Steps to Reproduce:
systemctl start ovn-northd                                                                            
                                                                                                      
ovn-nbctl ls-add ls2                                                                                  
ovn-nbctl lsp-add ls2 ls2p2                                                                           
ovn-nbctl lsp-set-addresses ls2p2 dynamic                                                             
ovn-nbctl set logical_switch ls2 other_config:subnet=172.16.1.1/29
                                                                                                      
ovn-nbctl list logical_switch_port ls2p2                                                              
ovn-nbctl set logical_switch ls2 other_config:subnet=172.16.1.254/29
ovn-nbctl list logical_switch_port ls2p2


Actual results:
when set subnet as 172.16.1.254/29, ipv4 is assigned as 172.16.2.0 

Expected results:
address should be 172.16.1.

Additional info:

[root@dell-per740-12 test]# bash -x test.sh
+ systemctl start ovn-northd
+ ovn-nbctl ls-add ls2  
+ ovn-nbctl lsp-add ls2 ls2p2
+ ovn-nbctl lsp-set-addresses ls2p2 dynamic
+ ovn-nbctl set logical_switch ls2 other_config:subnet=172.16.1.1/29
+ ovn-nbctl list logical_switch_port ls2p2
_uuid               : 615ad4f3-e050-4b39-bf0f-69f247ded2f1
addresses           : [dynamic]
dhcpv4_options      : []
dhcpv6_options      : []   
dynamic_addresses   : "82:fd:c9:10:01:04 172.16.1.3"           
enabled             : []                                          
external_ids        : {}                             
ha_chassis_group    : []              
name                : ls2p2    
options             : {}                                    
parent_name         : []               
port_security       : []            
tag                 : []                                         
tag_request         : []                      
type                : ""               
up                  : false
+ ovn-nbctl set logical_switch ls2 other_config:subnet=172.16.1.254/29
+ ovn-nbctl list logical_switch_port ls2p2
_uuid               : 615ad4f3-e050-4b39-bf0f-69f247ded2f1
addresses           : [dynamic]
dhcpv4_options      : []   
dhcpv6_options      : []                 
dynamic_addresses   : "82:fd:c9:10:01:04 172.16.2.0"   

<==== address is set ad 172.16.2.0
           
enabled             : []
external_ids        : {}                
ha_chassis_group    : []                                            
name                : ls2p2             
options             : {}   
parent_name         : []
port_security       : []
tag                 : []
tag_request         : []
type                : ""
up                  : false
[root@dell-per740-12 test]# rpm -qa | grep -E "openvswitch|ovn"
kernel-kernel-networking-openvswitch-ovn-load_balance-1.0-4.noarch
openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch
openvswitch2.13-2.13.0-9.el8fdp.x86_64
ovn2.13-2.13.0-11.el8fdp.x86_64
kernel-kernel-networking-openvswitch-ovn-common-1.0-7.noarch
ovn2.13-central-2.13.0-11.el8fdp.x86_64
ovn2.13-host-2.13.0-11.el8fdp.x86_64
kernel-kernel-networking-openvswitch-ovn-add_setting-1.0-1.noarch
python3-openvswitch2.13-2.13.0-9.el8fdp.x86_64

Comment 3 Jianlin Shi 2020-08-07 06:34:48 UTC
Verified on ovn2.11.1-53:

[root@dell-per740-42 bz1825701]# bash -x rep.sh                                                       
+ systemctl start ovn-northd
+ ovn-nbctl ls-add ls2
+ ovn-nbctl lsp-add ls2 ls2p2
+ ovn-nbctl lsp-set-addresses ls2p2 dynamic                                                           
+ ovn-nbctl set logical_switch ls2 other_config:subnet=172.16.1.1/29
+ ovn-nbctl list logical_switch_port ls2p2                                                            
_uuid               : 068038ec-6e40-47ee-9d1b-0c20cf5eeb15
addresses           : [dynamic]
dhcpv4_options      : []
dhcpv6_options      : []
dynamic_addresses   : "ca:00:fb:10:01:03 172.16.1.2"
enabled             : []
external_ids        : {}
ha_chassis_group    : []
name                : "ls2p2"
options             : {}
parent_name         : []
port_security       : []
tag                 : []
tag_request         : []
type                : ""
up                  : false
+ ovn-nbctl set logical_switch ls2 other_config:subnet=172.16.1.254/29                                
+ ovn-nbctl list logical_switch_port ls2p2                                                            
_uuid               : 068038ec-6e40-47ee-9d1b-0c20cf5eeb15                                            
addresses           : [dynamic]                                                                       
dhcpv4_options      : []
dhcpv6_options      : []
dynamic_addresses   : "ca:00:fb:10:01:03 172.16.1.250"                                                
enabled             : []
external_ids        : {}
ha_chassis_group    : []
name                : "ls2p2"
options             : {}
parent_name         : []
port_security       : []
tag                 : []
tag_request         : []
type                : ""
up                  : false
[root@dell-per740-42 bz1825701]# rpm -qa | grep -E "openvswitch|ovn"
ovn2.11-2.11.1-53.el7fdp.x86_64
openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch
openvswitch2.11-2.11.3-64.el7fdp.x86_64
ovn2.11-host-2.11.1-53.el7fdp.x86_64
ovn2.11-central-2.11.1-53.el7fdp.x86_64

Comment 5 errata-xmlrpc 2020-08-18 11:23:25 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.11 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:3487