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 2129244

Summary: ipv6 prefix is not generated when prefix_delegation is true
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Jianlin Shi <jishi>
Component: ovn22.03Assignee: lorenzo bianconi <lorenzo.bianconi>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: medium Docs Contact:
Priority: medium    
Version: FDP 21.ICC: ctrautma, jiji, mmichels, ovn-bot
Target Milestone: ---Keywords: Regression
Target Release: FDP 21.I   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn22.03-22.03.0-106.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-03 00:30:13 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:

Description Jianlin Shi 2022-09-23 03:50:31 UTC
This bug was initially created as a copy of Bug #2014444

I am copying this bug because following issue happened again on ovn22.03-22.03.0-95: 



Description of problem:
ipv6 prefix is not generated with prefix_delegation is true

Version-Release number of selected component (if applicable):
ovn-2021-21.09.0-10.el8

How reproducible:
Always

Steps to Reproduce:
systemctl start openvswitch        
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:127.0.0.1:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=127.0.0.1
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
sleep 5
sed s/^iface.*/"iface \"veth0_s0\" {"/g -i /etc/dibbler/server.conf
sed s/pd-pool.*/"pd-pool 2001:1db8:3333::\/80"/g -i /etc/dibbler/server.conf
sed s/t1.*/"t1 10"/g -i /etc/dibbler/server.conf
sed s/t2.*/"t2 15"/g -i /etc/dibbler/server.conf
cat > /var/lib/dibbler/server-AddrMgr.xml <<EOF
<AddrMgr>
  <timestamp>1575481348</timestamp>
  <replayDetection>0</replayDetection>
</AddrMgr>
EOF
cat > /var/lib/dibbler/server-CfgMgr.xml <<EOF
<SrvCfgMgr> 
  <workDir>/var/lib/dibbler</workDir>
  <LogName>Server</LogName>
  <LogLevel>8</LogLevel>
  <InactiveMode>0</InactiveMode>
  <GuessMode>0</GuessMode>
</SrvCfgMgr>
EOF

ip netns exec server0 dibbler-server run > dibbler.log &
sleep 10

ovn-nbctl list logical_router_port lr1-ls1

Actual results:
ipv6_prefix is null

Expected results:
ipv6_prefix should be generated

Additional info:


[root@dell-per740-12 bz1823226]# rpm -qa | grep -E "openvswitch2.16|ovn-2021"
ovn-2021-21.09.0-10.el8fdp.x86_64
ovn-2021-host-21.09.0-10.el8fdp.x86_64
openvswitch2.16-2.16.0-16.el8fdp.x86_64
openvswitch2.16-test-2.16.0-16.el8fdp.noarch
ovn-2021-central-21.09.0-10.el8fdp.x86_64
python3-openvswitch2.16-2.16.0-16.el8fdp.x86_64

+ ovn-nbctl list logical_router_port lr1-ls1                                                          
_uuid               : f41357e7-d5bb-48c7-a80f-66c8bdaf94e4
enabled             : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
ipv6_prefix         : []                                                                              
ipv6_ra_configs     : {}                                                                              
mac                 : "00:00:00:00:00:01"                                                             
name                : lr1-ls1                                                                         
networks            : ["172.16.1.1/24"]                                                               
options             : {prefix="true", prefix_delegation="true"}
peer                : []

<=== ipv6_prefix is not generated

it seems that ipv6 solicit it not sent by ovn

the issue didn't occur on ovn-2021-21.06.0-29.el8:

[root@dell-per730-20 bz1823226]# rpm -qa | grep -E "openvswitch2.16|ovn-2021"
openvswitch2.16-test-2.16.0-16.el8fdp.noarch
ovn-2021-21.06.0-29.el8fdp.x86_64
openvswitch2.16-2.16.0-16.el8fdp.x86_64
ovn-2021-central-21.06.0-29.el8fdp.x86_64
python3-openvswitch2.16-2.16.0-16.el8fdp.x86_64
ovn-2021-host-21.06.0-29.el8fdp.x86_64

+ ovn-nbctl list logical_router_port lr1-ls1
_uuid               : 3eb2738c-085f-4a30-afa5-b26422d115b5
enabled             : []
external_ids        : {}
gateway_chassis     : []
ha_chassis_group    : []
ipv6_prefix         : ["2001:1db8:3333::7e23:0:0/96"]
ipv6_ra_configs     : {}
mac                 : "00:00:00:00:00:01"
name                : lr1-ls1
networks            : ["172.16.1.1/24"]
options             : {prefix="true", prefix_delegation="true"}
peer                : []

<== ipv6_prefix is generated.

reproducer is related to https://bugzilla.redhat.com/show_bug.cgi?id=1823226

Comment 1 Jianlin Shi 2022-09-23 04:05:29 UTC
the issue didn't exist on ovn22.03-22.03.0-69. set regression

Comment 2 lorenzo bianconi 2022-09-29 11:25:54 UTC
the regression seems to be introduced by the following commit when the logical router is running in gw router mode.

commit 04292cc2dc2c3823b0cf86612e50ad0023bcb73f
Author: Xavier Simonart <xsimonar>
Date:   Mon Aug 29 05:27:20 2022 -0400

    controller: fix potential segmentation violation when removing ports
    
    If a logical switch port is added and connected to a logical router
    port (through options: router-port) before the router port is
    created, then this might cause further issues such as segmentation
    violation when the switch and router ports are deleted.
    
    Signed-off-by: Xavier Simonart <xsimonar>
    Signed-off-by: Han Zhou <hzhou>

The issue does not occur if the router is running in distributed mode with a distributed gw port.

Comment 4 OVN Bot 2022-10-06 04:06:29 UTC
ovn22.09 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2132529
ovn22.09 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2132530
ovn22.06 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2132533
ovn22.06 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2132534
ovn22.03 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2132536

Comment 8 Jianlin Shi 2022-10-14 01:56:36 UTC
Verified on ovn22.03-106.el8:

+ sleep 10
+ ip netns exec server0 dibbler-server run
+ ovn-nbctl list logical_router_port lr1-ls1
_uuid               : 1a0fc3ea-8cdf-4cb6-a823-5284ed47352d
enabled             : []
external_ids        : {}
gateway_chassis     : []
ha_chassis_group    : []
ipv6_prefix         : ["2001:1db8:3333::4b29:0:0/96"]
ipv6_ra_configs     : {}
mac                 : "00:00:00:00:00:01"
name                : lr1-ls1
networks            : ["172.16.1.1/24"]
options             : {prefix="true", prefix_delegation="true"}
peer                : []
[root@dell-per740-12 bz2129244]# rpm -qa | grep -E "openvswitch2.17|ovn22.03"
ovn22.03-host-22.03.0-106.el8fdp.x86_64
ovn22.03-central-22.03.0-106.el8fdp.x86_64
ovn22.03-22.03.0-106.el8fdp.x86_64
openvswitch2.17-2.17.0-58.el8fdp.x86_64

Comment 9 Jianlin Shi 2022-10-14 03:05:18 UTC
*** Bug 2132537 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2022-11-03 00:30:13 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 (ovn22.03), 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-2022:7393