Bug 1983862

Summary: ipv6_prefix doesn't update even configuration on server changed
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Jianlin Shi <jishi>
Component: ovn2.13Assignee: lorenzo bianconi <lorenzo.bianconi>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: medium Docs Contact:
Priority: medium    
Version: FDP 21.FCC: ctrautma, jiji, kfida, ralongi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn2.13-20.12.0-175.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-04 15:08:59 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 Jianlin Shi 2021-07-20 03:44:16 UTC
Description of problem:
ipv6_prefix doesn't update even configuration on server changed

Version-Release number of selected component (if applicable):
[root@dell-per740-12 bz1826623]# rpm -qa | grep -E "ovn-2021|openvswitch2.13"
python3-openvswitch2.13-2.13.0-117.el8fdp.x86_64
ovn-2021-21.06.0-12.el8fdp.x86_64
openvswitch2.13-2.13.0-117.el8fdp.x86_64
ovn-2021-central-21.06.0-12.el8fdp.x86_64
ovn-2021-host-21.06.0-12.el8fdp.x86_64

How reproducible:
Always

Steps to Reproduce:
systemctl start openvswitch                                                                                                                                                                        [33/1841]
systemctl start ovn-northd                                    
ovn-nbctl set-connection ptcp:6641   
ovn-sbctl set-connection ptcp:6642                   
ovs-vsctl set open . external_ids:system-id=hv1 external_ids:ovn-remote=tcp:20.0.39.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.39.25
systemctl restart ovn-controller                         
ovn-nbctl ls-add ls1    
                                          
ovn-nbctl lr-add lr1                                                  
ovn-nbctl lrp-add lr1 lr1-ls1 00:00:00:00:00:01 172.16.1.1/24
ovn-nbctl lsp-add ls1 ls1-lr1                                            
ovn-nbctl lsp-set-type ls1-lr1 router                            
ovn-nbctl lsp-set-options ls1-lr1 router-port=lr1-ls1  
ovn-nbctl lsp-set-addresses ls1-lr1 router                         
                                     
ovn-nbctl lsp-add ls1 lnls1
ovn-nbctl lsp-set-options lnls1 network_name=provider
ovn-nbctl lsp-set-type lnls1 localnet       
ovn-nbctl lsp-set-addresses lnls1 unknown     
                                                                        
ovn-nbctl set logical_router lr1 options:chassis=hv1          
                                                                      
ovn-nbctl lrp-add lr1 lr1-ls2 00:00:00:00:00:02 172.16.1.2/24 
ovn-nbctl lrp-add lr1 lr1-ls3 00:00:00:00:00:03 172.16.1.3/24
ovn-nbctl ls-add ls2    
ovn-nbctl lsp-add ls2 ls2-lr1                              
ovn-nbctl lsp-set-type ls2-lr1 router
ovn-nbctl lsp-set-options ls2-lr1 router-port=lr1-ls2
ovn-nbctl lsp-set-addresses ls2-lr1 router                              
                                                             
ovn-nbctl ls-add ls3                                                  
ovn-nbctl lsp-add ls3 ls3-lr1                                 
ovn-nbctl lsp-set-type ls3-lr1 router
ovn-nbctl lsp-set-options ls3-lr1 router-port=lr1-ls3
ovn-nbctl lsp-set-addresses ls3-lr1 router

ovs-vsctl add-br br-test
ip link set br-test up
ovs-vsctl set open . external-ids:ovn-bridge-mappings=provider:br-test

ip netns add server0
ip link add veth0_s0 netns server0 type veth peer name veth0_s0_p
ip netns exec server0 ip link set veth0_s0 up
ip netns exec server0 ip addr add 2001:1db8:3333::2/64 dev veth0_s0
ovs-vsctl add-port br-test veth0_s0_p
ip link set veth0_s0_p up

ip addr add 2001:1db8:3333::1/64 dev br-test

ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=true
#ovn-nbctl set logical_router_port lr1-ls1 options:prefix=true
ovn-nbctl set logical_router_port lr1-ls2 options:prefix=true
#ovn-nbctl set logical_router_port lr1-ls3 options:prefix=true

cat > dhcpd6.conf << EOF
option dhcp-rebinding-time 15;
option dhcp-renewal-time 10;
option dhcp6.unicast fe80::f455:8ff:fe20:6d66;
subnet6 2001:1db8:3333::/64 {

        # Some /64 prefixes available for Prefix Delegation (RFC 3633)
        prefix6 2001:1db8:3333:100:: 2001:1db8:3333:111:: /80;
}
EOF

ip netns exec server0 dhcpd -6 -cf ./dhcpd6.conf veth0_s0
sleep 2
ovn-nbctl list logical_router_port lr1-ls2
ip netns exec server0 pkill dhcpd

ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=false
ovn-nbctl set logical_router_port lr1-ls2 options:prefix=false
ovn-nbctl clear logical_router_port lr1-ls2 ipv6_prefix
ovn-nbctl list logical_router_port lr1-ls2
sleep 5m
cat > dhcpd6-2.conf << EOF
option dhcp-rebinding-time 15;
option dhcp-renewal-time 10;
option dhcp6.unicast fe80::f455:8ff:fe20:6d66;
subnet6 2001:1db8:3333::/64 {

        # Some /64 prefixes available for Prefix Delegation (RFC 3633)
        prefix6 2001:1db8:3333:200:: 2001:1db8:3333:211:: /80;
}
EOF
ip netns exec server0 dhcpd -6 -cf ./dhcpd6-2.conf veth0_s0
sleep 2

ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=true
ovn-nbctl set logical_router_port lr1-ls2 options:prefix=true
sleep 2
ovn-nbctl list logical_router_port lr1-ls2

Actual results:
ipv6_prefix for ls1-lr2 doesn't update when dhcpd.conf changed

Expected results:
ipv6_prefix update to the new configuration

Additional info:


+ ovn-nbctl list logical_router_port lr1-ls2
_uuid               : f01adddc-7cca-4814-a2ae-befe7e903c9e              
enabled             : []                                      
external_ids        : {}                                     
gateway_chassis     : []                                                     
ha_chassis_group    : []                                     
ipv6_prefix         : ["2001:1db8:3333:111::/80"]        
ipv6_ra_configs     : {}                                                        
mac                 : "00:00:00:00:00:02"                                                             
name                : lr1-ls2                        
networks            : ["172.16.1.2/24"]    
options             : {prefix="true"}       
peer                : []                                              
+ ip netns exec server0 pkill dhcpd                           
+ ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=false
+ ovn-nbctl set logical_router_port lr1-ls2 options:prefix=false
+ ovn-nbctl clear logical_router_port lr1-ls2 ipv6_prefix                                                                                                          
+ ovn-nbctl list logical_router_port lr1-ls2             
_uuid               : f01adddc-7cca-4814-a2ae-befe7e903c9e                
enabled             : []                                       
external_ids        : {}                                              
gateway_chassis     : []                                     
ha_chassis_group    : []                                                 
ipv6_prefix         : []                                         
ipv6_ra_configs     : {}                               
mac                 : "00:00:00:00:00:02"                          
name                : lr1-ls2        
networks            : ["172.16.1.2/24"]          
options             : {prefix="false"}               
peer                : []                    
+ sleep 5m                                    
+ cat                                                                   
+ ip netns exec server0 dhcpd -6 -cf ./dhcpd6-2.conf veth0_s0 
Internet Systems Consortium DHCP Server 4.3.6                         
Copyright 2004-2017 Internet Systems Consortium.                             
All rights reserved.                                         
For info, please visit https://www.isc.org/software/dhcp/
ldap_gssapi_principal is not set,GSSAPI Authentication for LDAP will not be used
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Config file: ./dhcpd6-2.conf                         
Database file: /var/lib/dhcpd/dhcpd6.leases                             
PID file: /var/run/dhcpd6.pid                                
No pool found for prefix 2001:1db8:3333:111::/80                      
Wrote 0 NA, 0 TA, 0 PD leases to lease file.                  
Bound to *:547                       
Listening on Socket/5/veth0_s0/2001:1db8:3333::/64
Sending on   Socket/5/veth0_s0/2001:1db8:3333::/64
+ sleep 2
+ ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=true
+ ovn-nbctl set logical_router_port lr1-ls2 options:prefix=true
+ sleep 2
+ ovn-nbctl list logical_router_port lr1-ls2                 
_uuid               : f01adddc-7cca-4814-a2ae-befe7e903c9e               
enabled             : []                                         
external_ids        : {}                               
gateway_chassis     : []                                           
ha_chassis_group    : []             
ipv6_prefix         : ["2001:1db8:3333:111::/80"]

<=== ipv6_prefix is still the old value.
<=== should update to "prefix6 2001:1db8:3333:200:: 2001:1db8:3333:211:: /80"

ipv6_ra_configs     : {}                             
mac                 : "00:00:00:00:00:02"   
name                : lr1-ls2                 
networks            : ["172.16.1.2/24"]                                 
options             : {prefix="true"}                         
peer                : []

Comment 5 Jianlin Shi 2021-09-18 03:28:56 UTC
reproducer passed on ovn2.13-20.12.0-178.el8:

[root@wsfd-advnetlab16 bz1983862]# rpm -qa | grep -E "openvswitch2.15|ovn2.13"
python3-openvswitch2.15-2.15.0-38.el8fdp.x86_64                                                       
ovn2.13-20.12.0-178.el8fdp.x86_64                                                                     
ovn2.13-host-20.12.0-178.el8fdp.x86_64                                                                
openvswitch2.15-2.15.0-38.el8fdp.x86_64                                                               
ovn2.13-central-20.12.0-178.el8fdp.x86_64

+ ovn-nbctl list logical_router_port lr1-ls2                                                          
_uuid               : 01889a43-6ce7-486e-ab12-afcd94937aab
enabled             : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
ipv6_prefix         : []                                                                              
ipv6_ra_configs     : {}                                                                              
mac                 : "00:00:00:00:00:02"                                                             
name                : lr1-ls2                                                                         
networks            : ["172.16.1.2/24"]                                                               
options             : {prefix="false"}                                                                
peer                : []                                                                              
+ sleep 1m                                                                                            
+ cat                                                                                                 
+ ip netns exec server0 dhcpd -6 -cf ./dhcpd6-2.conf veth0_s0
Internet Systems Consortium DHCP Server 4.3.6                                                         
Copyright 2004-2017 Internet Systems Consortium.                                                      
All rights reserved.                                                                                  
For info, please visit https://www.isc.org/software/dhcp/
ldap_gssapi_principal is not set,GSSAPI Authentication for LDAP will not be used
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Config file: ./dhcpd6-2.conf                                                                          
Database file: /var/lib/dhcpd/dhcpd6.leases                                                           
PID file: /var/run/dhcpd6.pid                                                                         
No pool found for prefix 2001:1db8:3333:111::/80                                                      
Wrote 0 NA, 0 TA, 0 PD leases to lease file.                                                          
Bound to *:547                                                                                        
Listening on Socket/5/veth0_s0/2001:1db8:3333::/64                                                    
Sending on   Socket/5/veth0_s0/2001:1db8:3333::/64                                                    
+ sleep 2                                                                                             
+ ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=true
+ ovn-nbctl set logical_router_port lr1-ls2 options:prefix=true
+ sleep 2                                                                                             
+ ovn-nbctl list logical_router_port lr1-ls2                                                          
_uuid               : 01889a43-6ce7-486e-ab12-afcd94937aab
enabled             : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
ipv6_prefix         : ["2001:1db8:3333:211::/80"] 

<=== ipv6_prefix updated
                                                    
ipv6_ra_configs     : {}                                                                              
mac                 : "00:00:00:00:00:02"                                                             
name                : lr1-ls2                                                                         
networks            : ["172.16.1.2/24"]                                                               
options             : {prefix="true"}                                                                 
peer                : []

Comment 6 Jianlin Shi 2021-09-18 03:37:23 UTC
also verified on ovn2.13-20.12.0-178.el7:

+ sleep 2
+ ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=true
+ ovn-nbctl set logical_router_port lr1-ls2 options:prefix=true
+ sleep 2
+ ovn-nbctl list logical_router_port lr1-ls2
_uuid               : c6a80e8b-97d6-4143-a91e-d2eea0d65e9e
enabled             : []
external_ids        : {}
gateway_chassis     : []
ha_chassis_group    : []
ipv6_prefix         : ["2001:1db8:3333:211::/80"]
ipv6_ra_configs     : {}
mac                 : "00:00:00:00:00:02"
name                : lr1-ls2
networks            : ["172.16.1.2/24"]
options             : {prefix="true"}
peer                : []
[root@wsfd-advnetlab18 bz1983862]# rpm -qa | grep -E "openvswitch2.13|ovn2.13"
openvswitch2.13-2.13.0-102.el7fdp.x86_64
ovn2.13-20.12.0-178.el7fdp.x86_64
ovn2.13-central-20.12.0-178.el7fdp.x86_64
ovn2.13-host-20.12.0-178.el7fdp.x86_64

Comment 7 Jianlin Shi 2021-09-18 03:40:01 UTC
also verified on ovn-2021-21.06.0-29.el8:

+ ovn-nbctl set logical_router_port lr1-ls1 options:prefix_delegation=true
+ ovn-nbctl set logical_router_port lr1-ls2 options:prefix=true
+ sleep 2
+ ovn-nbctl list logical_router_port lr1-ls2
_uuid               : 815ea976-4c40-4069-ba91-06339debc0b6
enabled             : []
external_ids        : {}
gateway_chassis     : []
ha_chassis_group    : []
ipv6_prefix         : ["2001:1db8:3333:211::/80"]
ipv6_ra_configs     : {}
mac                 : "00:00:00:00:00:02"
name                : lr1-ls2
networks            : ["172.16.1.2/24"]
options             : {prefix="true"}
peer                : []
[root@wsfd-advnetlab16 bz1983862]# rpm -qa | grep -E "openvswitch2.15|ovn-2021"
ovn-2021-21.06.0-29.el8fdp.x86_64
python3-openvswitch2.15-2.15.0-38.el8fdp.x86_64
ovn-2021-central-21.06.0-29.el8fdp.x86_64
openvswitch2.15-2.15.0-38.el8fdp.x86_64
ovn-2021-host-21.06.0-29.el8fdp.x86_64

Comment 9 errata-xmlrpc 2021-10-04 15:08:59 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-2021:3717