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 2100355

Summary: ipv6 route with local ipv6 should not be learned if ipv6 is not assigned
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 22.ECC: ctrautma, jiji
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-06 18:49:10 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-06-23 07:41:28 UTC
This bug was initially created as a copy of Bug #2055988

I am copying this bug because: 

close the old bug, and add this one to track route issue


Description of problem:
ipv6 over ts can't work if ipv6 is not configured on the lrp which is connected to transit switch

Version-Release number of selected component (if applicable):
ovn-2021-21.12.0-15

How reproducible:
Always

Steps to Reproduce:
1. setup on one machine:
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:1.1.184.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=1.1.184.25
systemctl restart ovn-controller                                                                      
                                                                                                      
ovn-nbctl ls-add ls1                                                                   
ovn-nbctl lsp-add ls1 ls1p1                                                                     
ovn-nbctl lsp-set-addresses ls1p1 "00:00:00:01:01:01 192.168.1.1 2001::1"
ovn-nbctl lsp-add ls1 ls1p2                                                                           
ovn-nbctl lsp-set-addresses ls1p2 "00:00:00:01:01:02 192.168.1.2 2001::2"
                                                   
ovn-nbctl ls-add ls3                                                                                  
ovn-nbctl lsp-add ls3 ls3p1             
ovn-nbctl lsp-set-addresses ls3p1 "00:00:00:00:03:01 192.168.3.1 2003::1"
                                                                                                      
ovn-nbctl lr-add lr1                                                
ovn-nbctl lrp-add lr1 lr1-ls1 00:00:00:00:00:01 192.168.1.254/24 2001::a/64
ovn-nbctl lsp-add ls1 ls1-lr1
ovn-nbctl lsp-set-addresses ls1-lr1 "00:00:00:00:00:01 192.168.1.254 2001::a"                   
ovn-nbctl lsp-set-type ls1-lr1 router              
ovn-nbctl lsp-set-options ls1-lr1 router-port=lr1-ls1
                                                                                                      
ovn-nbctl lrp-add lr1 lr1-ls3 00:00:00:00:03:00 192.168.3.254/24 2003::a/64
ovn-nbctl lsp-add ls3 ls3-lr1 \                                                                       
        -- lsp-set-addresses ls3-lr1 router \                                                         
        -- lsp-set-type ls3-lr1 router \                                                              
        -- lsp-set-options ls3-lr1 router-port=lr1-ls3 

ovs-vsctl add-port br-int ls3p1 -- set interface ls3p1 type=internal external_ids:iface-id=ls3p1
ip netns add ls3p1                                                                                                                                                                                          
ip link set ls3p1 netns ls3p1                                                                                                                                                                               
ip netns exec ls3p1 ip link set ls3p1 address 00:00:00:00:03:01
ip netns exec ls3p1 ip link set ls3p1 up           
ip netns exec ls3p1 ip addr add 192.168.3.1/24 dev ls3p1                       
ip netns exec ls3p1 ip route add default via 192.168.3.254    
ip netns exec ls3p1 ip -6 addr add 2003::1/64 dev ls3p1
ip netns exec ls3p1 ip -6 route add default via 2003::a
                                                   
ovs-vsctl add-port br-int ls1p1 -- set interface ls1p1 type=internal external_ids:iface-id=ls1p1
ip netns add ls1p1                                 
ip link set ls1p1 netns ls1p1                                                                         
ip netns exec ls1p1 ip link set ls1p1 address 00:00:00:01:01:01
ip netns exec ls1p1 ip link set ls1p1 up
ip netns exec ls1p1 ip addr add 192.168.1.1/24 dev ls1p1
ip netns exec ls1p1 ip route add default via 192.168.1.254
ip netns exec ls1p1 ip -6 addr add 2001::1/64 dev ls1p1
ip netns exec ls1p1 ip -6 route add default via 2001::a
ovs-vsctl add-port br-int ls1p2 -- set interface ls1p2 type=internal external_ids:iface-id=ls1p2
ip netns add ls1p2
ip link set ls1p2 netns ls1p2
ip netns exec ls1p2 ip link set ls1p2 address 00:00:00:01:01:02
ip netns exec ls1p2 ip link set ls1p2 up
ip netns exec ls1p2 ip addr add 192.168.1.2/24 dev ls1p2
ip netns exec ls1p2 ip route add default via 192.168.1.254
ip netns exec ls1p2 ip -6 addr add 2001::2/64 dev ls1p2
ip netns exec ls1p2 ip -6 route add default via 2001::a

ovn-nbctl set NB_Global . name=az2
/usr/share/ovn/scripts/ovn-ctl --db-ic-nb-create-insecure-remote=yes --db-ic-sb-create-insecure-remote=yes start_ic_ovsdb
/usr/share/ovn/scripts/ovn-ctl --ovn-ic-nb-db=tcp:1.1.184.25:6645 --ovn-ic-sb-db=tcp:1.1.184.25:6646 --ovn-northd-nb-db=tcp:1.1.184.25:6641 --ovn-northd-sb-db=tcp:1.1.184.25:6642 start_ic
ovs-vsctl set open_vswitch . external_ids:ovn-is-interconn=true
ovn-ic-nbctl ts-add ts1

ovn-nbctl lrp-add lr1 lr1-ts1 aa:aa:aa:aa:aa:02 172.1.100.2/24
ovn-nbctl lsp-add ts1 ts1-lr1 -- \
        lsp-set-addresses ts1-lr1 router -- \
        lsp-set-type ts1-lr1 router -- \
        lsp-set-options ts1-lr1 router-port=lr1-ts1
ovn-nbctl lrp-set-gateway-chassis lr1-ts1 hv1
ovn-nbctl set NB_Global . options:ic-route-adv=true options:ic-route-learn=true

2. setup on the other machine:

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=hv0 external_ids:ovn-remote=tcp:1.1.184.26:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=1.1.184.26
systemctl restart ovn-controller                                                                      

ovn-nbctl ls-add ls1                                                                                  
ovn-nbctl lsp-add ls1 ls1p1
ovn-nbctl lsp-set-addresses ls1p1 "00:00:00:01:01:01 192.168.2.1 2002::1"                             
ovn-nbctl lsp-add ls1 ls1p2
ovn-nbctl lsp-set-addresses ls1p2 "00:00:00:01:01:02 192.168.2.2 2002::2"                             

ovn-nbctl lr-add lr2
ovn-nbctl lrp-add lr2 lr2-ls1 00:00:00:00:00:01 192.168.2.254/24 2002::a/64                           
ovn-nbctl lsp-add ls1 ls1-lr2                                                                         
ovn-nbctl lsp-set-addresses ls1-lr2 "00:00:00:00:00:01 192.168.2.254 2002::a"
ovn-nbctl lsp-set-type ls1-lr2 router                                                                 
ovn-nbctl lsp-set-options ls1-lr2 router-port=lr2-ls1                                                 

ovs-vsctl add-port br-int ls1p1 -- set interface ls1p1 type=internal external_ids:iface-id=ls1p1      
ip netns add ls1p1
ip link set ls1p1 netns ls1p1
ip netns exec ls1p1 ip link set ls1p1 address 00:00:00:01:01:01                                       
ip netns exec ls1p1 ip link set ls1p1 up
ip netns exec ls1p1 ip addr add 192.168.2.1/24 dev ls1p1                                              
ip netns exec ls1p1 ip route add default via 192.168.2.254
ip netns exec ls1p1 ip -6 addr add 2002::1/64 dev ls1p1                                               
ip netns exec ls1p1 ip -6 route add default via 2002::a                                               

ovs-vsctl add-port br-int ls1p2 -- set interface ls1p2 type=internal external_ids:iface-id=ls1p2      
ip netns add ls1p2
ip link set ls1p2 netns ls1p2
ip netns exec ls1p2 ip link set ls1p2 address 00:00:00:01:01:02                                       
ip netns exec ls1p2 ip link set ls1p2 up
ip netns exec ls1p2 ip addr add 192.168.2.2/24 dev ls1p2                                              
ip netns exec ls1p2 ip route add default via 192.168.2.254                                            
ip netns exec ls1p2 ip -6 addr add 2002::2/64 dev ls1p2
ip netns exec ls1p2 ip -6 route add default via 2002::a                                               

ovn-nbctl set NB_Global . name=az1
/usr/share/ovn/scripts/ovn-ctl --ovn-ic-nb-db=tcp:1.1.184.25:6645 --ovn-ic-sb-db=tcp:1.1.184.25:6646 --ovn-northd-nb-db=tcp:1.1.184.26:6641 --ovn-northd-sb-db=tcp:1.1.184.26:6642 start_ic
ovs-vsctl set open_vswitch . external_ids:ovn-is-interconn=true                                       
                    
ovn-nbctl lrp-add lr2 lr2-ts1 aa:aa:aa:aa:aa:01 172.1.100.1/24                                        
ovn-nbctl lsp-add ts1 ts1-lr2 -- \                                                                    
        lsp-set-addresses ts1-lr2 router -- \                                                         
        lsp-set-type ts1-lr2 router -- \                                                              
        lsp-set-options ts1-lr2 router-port=lr2-ts1                                                   
ovn-nbctl lrp-set-gateway-chassis lr2-ts1 hv0                                                         
ovn-nbctl set NB_Global . options:ic-route-adv=true options:ic-route-learn=true 

3. run ping on the first machine:

ip netns exec ls1p1 ping6 2002::1 -c 1

Actual results:
failed

Expected results:
pass

Additional info:

[root@wsfd-advnetlab16 ic]# ovn-nbctl lr-route-list lr1                                               
IPv4 Routes                                                                                           
Route Table <main>:                                                                                   
           192.168.2.0/24               172.1.100.1 dst-ip (learned)                                  
                                                                                                      
IPv6 Routes                                                                                           
Route Table <main>:                                                                                   
                2002::/64 fe80::a8aa:aaff:feaa:aa01 dst-ip (learned)

<=== ipv6 route is learned automatically, and the nexthop if the fe80 address


<<==== ipv6 route should not be learned

[root@wsfd-advnetlab16 ic]# ip netns exec ls1p1 ping6 2002::1 -c 1                                    
PING 2002::1(2002::1) 56 data bytes                                                                   
                                                                                                      
--- 2002::1 ping statistics ---                                                                       
1 packets transmitted, 0 received, 100% packet loss, time 0ms   

<=== ping6 failed                                      
                                                                                                      
[root@wsfd-advnetlab16 ic]# ip netns exec ls1p1 ping6 2003::1 -c 1                                    
PING 2003::1(2003::1) 56 data bytes                                                                   
64 bytes from 2003::1: icmp_seq=1 ttl=63 time=2.74 ms                                                 
                                                                                                      
--- 2003::1 ping statistics ---                                                                       
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                           
rtt min/avg/max/mdev = 2.739/2.739/2.739/0.000 ms

[root@wsfd-advnetlab16 ic]# rpm -qa | grep -E "openvswitch|ovn-2021"                                  
ovn-2021-21.12.0-15.el8fdp.x86_64                                                                     
openvswitch2.15-2.15.0-72.el8fdp.x86_64                                                               
kernel-kernel-networking-openvswitch-ovn-common-1.0-25.noarch                                         
openvswitch-selinux-extra-policy-1.0-29.el8fdp.noarch                                                 
ovn-2021-central-21.12.0-15.el8fdp.x86_64                                                             
kernel-kernel-networking-openvswitch-ovn-Interconnection-1.0-3.noarch                                 
ovn-2021-host-21.12.0-15.el8fdp.x86_64

Comment 2 OVN Bot 2022-07-20 12:36:25 UTC
This issue has been cloned at https://bugzilla.redhat.com/show_bug.cgi?id=2109109
This issue has been cloned at https://bugzilla.redhat.com/show_bug.cgi?id=2109110

Comment 3 OVN Bot 2022-07-20 12:36:38 UTC
This issue has been cloned at https://bugzilla.redhat.com/show_bug.cgi?id=2109111
This issue has been cloned at https://bugzilla.redhat.com/show_bug.cgi?id=2109112

Comment 6 Jianlin Shi 2022-08-02 00:48:09 UTC
reproduced on ovn22.03-22.03.0-52.el8:

[root@dell-per740-33 bz2100355]# ovn-nbctl lr-route-list lr1                                          
IPv4 Routes                                                                                           
Route Table <main>:                                                                                   
           192.168.2.0/24               172.1.100.1 dst-ip (learned)                                  
                                                                                                      
IPv6 Routes                                                                                           
Route Table <main>:                                                                                   
                2002::/64 fe80::a8aa:aaff:feaa:aa01 dst-ip (learned)                                  
[root@dell-per740-33 bz2100355]# ip netns exec ls1p1 ping6 2002::1 -c 1                               
PING 2002::1(2002::1) 56 data bytes                                                                   
                                                                                                      
--- 2002::1 ping statistics ---                                                                       
1 packets transmitted, 0 received, 100% packet loss, time 0ms                                         
                                                                                                      
[root@dell-per740-33 bz2100355]# ip netns exec ls1p1 ping6 2003::1 -c 1                               
PING 2003::1(2003::1) 56 data bytes                                                                   
64 bytes from 2003::1: icmp_seq=1 ttl=63 time=1.82 ms                                                 
                                                                                                      
--- 2003::1 ping statistics ---                                                                       
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                           
rtt min/avg/max/mdev = 1.821/1.821/1.821/0.000 ms                                                     
[root@dell-per740-33 bz2100355]# rpm -qa | grep -E "openvswitch2.17|ovn22.03"                         
ovn22.03-central-22.03.0-52.el8fdp.x86_64                                                             
ovn22.03-22.03.0-52.el8fdp.x86_64                                                                     
ovn22.03-host-22.03.0-52.el8fdp.x86_64                                                                
openvswitch2.17-2.17.0-37.el8fdp.x86_64

Verified on ovn22.03-22.03.0-69.el8:

[root@dell-per740-33 bz2100355]# ovn-nbctl lr-route-list lr1                                          
IPv4 Routes                                                                                           
Route Table <main>:                                                                                   
           192.168.2.0/24               172.1.100.1 dst-ip (learned)  

<=== ipv6 route is not learned
                                
[root@dell-per740-33 bz2100355]# rpm -qa | grep -E "openvswitch2.17|ovn22.03"                         
ovn22.03-central-22.03.0-69.el8fdp.x86_64                                                             
ovn22.03-22.03.0-69.el8fdp.x86_64                                                                     
openvswitch2.17-2.17.0-37.el8fdp.x86_64                                                               
ovn22.03-host-22.03.0-69.el8fdp.x86_64

Comment 8 errata-xmlrpc 2022-09-06 18:49:10 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 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-2022:6360