Bug 1804576 - [ovn2.13-rhel8]router_preference doesn't take effect if send_periodic is false
Summary: [ovn2.13-rhel8]router_preference doesn't take effect if send_periodic is false
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.13
Version: FDP 20.A
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Gabriele Cerami
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks: 1851788 1804590 1804595
TreeView+ depends on / blocked
 
Reported: 2020-02-19 08:14 UTC by Jianlin Shi
Modified: 2020-07-15 13:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1804590 1804595 1851788 (view as bug list)
Environment:
Last Closed: 2020-07-15 13:00:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github ovn-org/ovn/commit/f17b6ce793aa025e5cbca65846d6b5c07c45526c None None None 2020-08-21 12:21:18 UTC
Red Hat Product Errata RHBA-2020:2941 None None None 2020-07-15 13:01:30 UTC

Description Jianlin Shi 2020-02-19 08:14:31 UTC
Description of problem:
router_preference doesn't take effect if send_periodic is false

Version-Release number of selected component (if applicable):
ovn2.13-2.13.0-0.20200217git7886ac9.el8fdp.x86_64

How reproducible:
always

Steps to Reproduce:
1. set router_preference as low
2. set send_periodic as false
3. send router solicitation to ovn, and ovn would reply router advertisement

Actual results:
pref is medium in the router advertisement

Expected results:
perf should be low

Additional info:

[root@dell-per740-12 test]# cat setup.sh
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:20.0.30.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.30.25
systemctl restart ovn-controller
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 lo up
ip netns exec server0 ip link set veth0_s0 up
ip netns exec server0 ip link set veth0_s0 address 00:00:00:01:01:02
ip netns exec server0 ip addr add 192.168.1.1/24 dev veth0_s0                                         
ovs-vsctl add-port br-int veth0_s0_p
ip link set veth0_s0_p up                                                                             
ovs-vsctl set interface veth0_s0_p external_ids:iface-id=ls1p1                                        
ovn-nbctl ls-add ls1
ovn-nbctl lsp-add ls1 ls1p1
ovn-nbctl lsp-set-addresses ls1p1 00:00:00:01:01:02
ovn-nbctl lsp-add ls1 ls1p2                                                                           
ovn-nbctl lsp-set-addresses ls1p2 00:00:00:01:02:02
ovn-nbctl lr-add lr1
ovn-nbctl lrp-add lr1 lr1-ls1 00:00:00:00:00:01 aef0:0:0:0:0:0:0:1/64                                 
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 00:00:00:00:00:01                                                 
ovn-nbctl lsp-add ls1 ls1p3
ovn-nbctl lsp-set-addresses ls1p3 00:00:00:01:03:02
ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:send_periodic=true
ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:address_mode=slaac
ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:max_interval=4
ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:min_interval=3
ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1 ipv6_ra_configs:rdnss=aef0::11
ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1 ipv6_ra_configs:router_preference=LOW
ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1 ipv6_ra_configs:dnssl=aa.bb.cc
ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1 ipv6_ra_configs:route_info=HIGH-aef1::11/48,LOW-aef2::11/96
ovn-nbctl list logical_router_port lr1-ls1

after setup, run following command:

[root@dell-per740-12 test]# ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:send_periodic=false

[root@dell-per740-12 test]# ovn-nbctl list logical_router_port lr1-ls1                                                                                                                                      
_uuid               : 7d565042-d5d2-415f-97eb-39880a674612
enabled             : []                                                                                      
external_ids        : {}                                                 
gateway_chassis     : []                     
ha_chassis_group    : []                                                                                                  
ipv6_ra_configs     : {address_mode=slaac, dnssl=aa.bb.cc, max_interval="4", min_interval="3", rdnss="aef0::11", route_info="HIGH-aef1::11/48,LOW-aef2::11/96", router_preference=LOW, send_periodic="false"
}                                                      
mac                 : "00:00:00:00:00:01"                                                                                                                                                                   
name                : lr1-ls1                                                                              
networks            : ["aef0:0:0:0:0:0:0:1/64"]                                                                                                                                                             
options             : {}                          
peer                : []

[root@dell-per740-12 test]# ip netns exec server0 ip link set veth0_s0 down
[root@dell-per740-12 test]# ip netns exec server0 ip link set veth0_s0 up && ip netns exec server0 tcpdump -i veth0_s0 -nnle -vvv
tcpdump: listening on veth0_s0, link-type EN10MB (Ethernet), capture size 262144 bytes
              
fe80::200:ff:fe01:102 > ff02::2: [icmp6 sum ok] ICMP6, rou
ter solicitation, length 16                                                       
          source link-address option (1), length 8 (1): 00:00:00:01:01:02                
            0x0000:  0000 0001 0102                                                                                                                                
03:08:13.123692 00:00:00:00:00:01 > 00:00:00:01:01:02, ethertype IPv6 (0x86dd), length 110: (hlim 255, next-header ICMPv6 (58) payload length: 56) fe80::200:ff:fe00:1 > fe80::200:ff:fe01:102: [icmp6 sum o
k] ICMP6, router advertisement, length 56 
        hop limit 255, Flags [none], pref medium, router lifetime 65535s, reachable time 0ms, retrans time 0ms
          source link-address option (1), length 8 (1): 00:00:00:00:00:01 
            0x0000:  0000 0000 0001
          prefix info option (3), length 32 (4): aef0::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
            0x0000:  40c0 ffff ffff ffff ffff 0000 0000 aef0
            0x0010:  0000 0000 0000 0000 0000 0000 0000 

<=== pref is medium in the router advertisement, in addition, other ra configuration are not contained in the packet: dnssl, rdnss, etc.

[root@dell-per740-12 test]# ip netns exec server0 ip -6 route list default
default via fe80::200:ff:fe00:1 dev veth0_s0 proto ra metric 1024 expires 65176sec hoplimit 255 pref medium

<== pref is medium

Comment 1 lorenzo bianconi 2020-02-19 15:15:18 UTC
(In reply to Jianlin Shi from comment #0)
> Description of problem:
> router_preference doesn't take effect if send_periodic is false
> 
> Version-Release number of selected component (if applicable):
> ovn2.13-2.13.0-0.20200217git7886ac9.el8fdp.x86_64
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1. set router_preference as low
> 2. set send_periodic as false
> 3. send router solicitation to ovn, and ovn would reply router advertisement
> 
> Actual results:
> pref is medium in the router advertisement
> 
> Expected results:
> perf should be low
> 
> Additional info:
> 
> [root@dell-per740-12 test]# cat setup.sh
> 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:20.0.30.25:6642
> external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.30.25
> systemctl restart ovn-controller
> 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 lo up
> ip netns exec server0 ip link set veth0_s0 up
> ip netns exec server0 ip link set veth0_s0 address 00:00:00:01:01:02
> ip netns exec server0 ip addr add 192.168.1.1/24 dev veth0_s0               
> 
> ovs-vsctl add-port br-int veth0_s0_p
> ip link set veth0_s0_p up                                                   
> 
> ovs-vsctl set interface veth0_s0_p external_ids:iface-id=ls1p1              
> 
> ovn-nbctl ls-add ls1
> ovn-nbctl lsp-add ls1 ls1p1
> ovn-nbctl lsp-set-addresses ls1p1 00:00:00:01:01:02
> ovn-nbctl lsp-add ls1 ls1p2                                                 
> 
> ovn-nbctl lsp-set-addresses ls1p2 00:00:00:01:02:02
> ovn-nbctl lr-add lr1
> ovn-nbctl lrp-add lr1 lr1-ls1 00:00:00:00:00:01 aef0:0:0:0:0:0:0:1/64       
> 
> 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 00:00:00:00:00:01                       
> 
> ovn-nbctl lsp-add ls1 ls1p3
> ovn-nbctl lsp-set-addresses ls1p3 00:00:00:01:03:02
> ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:send_periodic=true
> ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:address_mode=slaac
> ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:max_interval=4
> ovn-nbctl set Logical_Router_Port lr1-ls1 ipv6_ra_configs:min_interval=3
> ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1
> ipv6_ra_configs:rdnss=aef0::11
> ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1
> ipv6_ra_configs:router_preference=LOW
> ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1
> ipv6_ra_configs:dnssl=aa.bb.cc
> ovn-nbctl --wait=hv set Logical_Router_port lr1-ls1
> ipv6_ra_configs:route_info=HIGH-aef1::11/48,LOW-aef2::11/96
> ovn-nbctl list logical_router_port lr1-ls1
> 
> after setup, run following command:
> 
> [root@dell-per740-12 test]# ovn-nbctl set Logical_Router_Port lr1-ls1
> ipv6_ra_configs:send_periodic=false
> 
> [root@dell-per740-12 test]# ovn-nbctl list logical_router_port lr1-ls1      
> 
> _uuid               : 7d565042-d5d2-415f-97eb-39880a674612
> enabled             : []                                                    
> 
> external_ids        : {}                                                 
> gateway_chassis     : []                     
> ha_chassis_group    : []                                                    
> 
> ipv6_ra_configs     : {address_mode=slaac, dnssl=aa.bb.cc, max_interval="4",
> min_interval="3", rdnss="aef0::11",
> route_info="HIGH-aef1::11/48,LOW-aef2::11/96", router_preference=LOW,
> send_periodic="false"
> }                                                      
> mac                 : "00:00:00:00:00:01"                                   
> 
> name                : lr1-ls1                                               
> 
> networks            : ["aef0:0:0:0:0:0:0:1/64"]                             
> 
> options             : {}                          
> peer                : []
> 
> [root@dell-per740-12 test]# ip netns exec server0 ip link set veth0_s0 down
> [root@dell-per740-12 test]# ip netns exec server0 ip link set veth0_s0 up &&
> ip netns exec server0 tcpdump -i veth0_s0 -nnle -vvv
> tcpdump: listening on veth0_s0, link-type EN10MB (Ethernet), capture size
> 262144 bytes
>               
> fe80::200:ff:fe01:102 > ff02::2: [icmp6 sum ok] ICMP6, rou
> ter solicitation, length 16                                                 
> 
>           source link-address option (1), length 8 (1): 00:00:00:01:01:02   
> 
>             0x0000:  0000 0001 0102                                         
> 
> 03:08:13.123692 00:00:00:00:00:01 > 00:00:00:01:01:02, ethertype IPv6
> (0x86dd), length 110: (hlim 255, next-header ICMPv6 (58) payload length: 56)
> fe80::200:ff:fe00:1 > fe80::200:ff:fe01:102: [icmp6 sum o
> k] ICMP6, router advertisement, length 56 
>         hop limit 255, Flags [none], pref medium, router lifetime 65535s,
> reachable time 0ms, retrans time 0ms
>           source link-address option (1), length 8 (1): 00:00:00:00:00:01 
>             0x0000:  0000 0000 0001
>           prefix info option (3), length 32 (4): aef0::/64, Flags [onlink,
> auto], valid time infinity, pref. time infinity
>             0x0000:  40c0 ffff ffff ffff ffff 0000 0000 aef0
>             0x0010:  0000 0000 0000 0000 0000 0000 0000 
> 
> <=== pref is medium in the router advertisement, in addition, other ra
> configuration are not contained in the packet: dnssl, rdnss, etc.
> 
> [root@dell-per740-12 test]# ip netns exec server0 ip -6 route list default
> default via fe80::200:ff:fe00:1 dev veth0_s0 proto ra metric 1024 expires
> 65176sec hoplimit 255 pref medium
> 
> <== pref is medium

This feature is not currently implemented when logical router receives router solicitations but just for periodic router advertisements. I guess we can change it in a RFE

Comment 5 Jianlin Shi 2020-06-28 01:52:09 UTC
[root@dell-per740-12 bz1804576]# rpm -qa | grep -E "openvswitch|ovn"
openvswitch2.13-2.13.0-40.el8fdb.x86_64
ovn2.13-2.13.0-37.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch
ovn2.13-central-2.13.0-37.el8fdp.x86_64
ovn2.13-host-2.13.0-37.el8fdp.x86_64

[root@dell-per740-12 bz1804576]# ip netns exec server0 ip link set veth0_s0 up && ip netns exec server0 tcpdump -i veth0_s0 -nnle -vvv
tcpdump: listening on veth0_s0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:46:37.267412 00:00:00:01:01:02 > 33:33:00:00:00:16, ethertype IPv6 (0x86dd), length 90: (hlim 1, next-header Options (0) payload length: 36) :: > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff01:102 to_ex { }]
21:46:37.403438 36:08:5c:4c:bb:5e > 33:33:00:00:00:16, ethertype IPv6 (0x86dd), length 90: (hlim 1, next-header Options (0) payload length: 36) fe80::3408:5cff:fe4c:bb5e > ff02::16: HBH (rtalert: 0x0000)
(padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff4c:bb5e to_ex { }]
21:46:37.851456 00:00:00:01:01:02 > 33:33:00:00:00:16, ethertype IPv6 (0x86dd), length 90: (hlim 1, next-header Options (0) payload length: 36) fe80::200:ff:fe01:102 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff01:102 to_ex { }]
21:46:37.851481 00:00:00:01:01:02 > 33:33:00:00:00:02, ethertype IPv6 (0x86dd), length 70: (hlim 255, next-header ICMPv6 (58) payload length: 16) fe80::200:ff:fe01:102 > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 16                                                                           
          source link-address option (1), length 8 (1): 00:00:00:01:01:02
            0x0000:  0000 0001 0102                                                                   
21:46:37.852392 00:00:00:00:00:01 > 00:00:00:01:01:02, ethertype IPv6 (0x86dd), length 110: (hlim 255, next-header ICMPv6 (58) payload length: 56) fe80::200:ff:fe00:1 > fe80::200:ff:fe01:102: [icmp6 sum ok] ICMP6, router advertisement, length 56                                                             
        hop limit 255, Flags [none], pref low, router lifetime 65535s, reachable time 0ms, retrans time 0ms
          source link-address option (1), length 8 (1): 00:00:00:00:00:01
            0x0000:  0000 0000 0001
          prefix info option (3), length 32 (4): aef0::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
            0x0000:  40c0 ffff ffff ffff ffff 0000 0000 aef0                                          
            0x0010:  0000 0000 0000 0000 0000 0000 0000

<==== pref is low, but still no other info: dnssl, rdnss, etc.

[root@dell-per740-12 bz1804576]# ip netns exec server0 ip -6 route list default
default via fe80::200:ff:fe00:1 dev veth0_s0 proto ra metric 1024 expires 65440sec hoplimit 255 pref low

<=== pref is low


about dnssl,rdnss and route_info in router advertisement triggered by router solicitation, shoud I report another bug? or set failqa for this bug?

Comment 6 Numan Siddique 2020-06-28 12:51:58 UTC
(In reply to Jianlin Shi from comment #5)
> [root@dell-per740-12 bz1804576]# rpm -qa | grep -E "openvswitch|ovn"
> openvswitch2.13-2.13.0-40.el8fdb.x86_64
> ovn2.13-2.13.0-37.el8fdp.x86_64
> openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch
> ovn2.13-central-2.13.0-37.el8fdp.x86_64
> ovn2.13-host-2.13.0-37.el8fdp.x86_64
> 
> [root@dell-per740-12 bz1804576]# ip netns exec server0 ip link set veth0_s0
> up && ip netns exec server0 tcpdump -i veth0_s0 -nnle -vvv
> tcpdump: listening on veth0_s0, link-type EN10MB (Ethernet), capture size
> 262144 bytes
> 21:46:37.267412 00:00:00:01:01:02 > 33:33:00:00:00:16, ethertype IPv6
> (0x86dd), length 90: (hlim 1, next-header Options (0) payload length: 36) ::
> > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast
> listener report v2, 1 group record(s) [gaddr ff02::1:ff01:102 to_ex { }]
> 21:46:37.403438 36:08:5c:4c:bb:5e > 33:33:00:00:00:16, ethertype IPv6
> (0x86dd), length 90: (hlim 1, next-header Options (0) payload length: 36)
> fe80::3408:5cff:fe4c:bb5e > ff02::16: HBH (rtalert: 0x0000)
> (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s)
> [gaddr ff02::1:ff4c:bb5e to_ex { }]
> 21:46:37.851456 00:00:00:01:01:02 > 33:33:00:00:00:16, ethertype IPv6
> (0x86dd), length 90: (hlim 1, next-header Options (0) payload length: 36)
> fe80::200:ff:fe01:102 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum
> ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr
> ff02::1:ff01:102 to_ex { }]
> 21:46:37.851481 00:00:00:01:01:02 > 33:33:00:00:00:02, ethertype IPv6
> (0x86dd), length 70: (hlim 255, next-header ICMPv6 (58) payload length: 16)
> fe80::200:ff:fe01:102 > ff02::2: [icmp6 sum ok] ICMP6, router solicitation,
> length 16                                                                   
> 
>           source link-address option (1), length 8 (1): 00:00:00:01:01:02
>             0x0000:  0000 0001 0102                                         
> 
> 21:46:37.852392 00:00:00:00:00:01 > 00:00:00:01:01:02, ethertype IPv6
> (0x86dd), length 110: (hlim 255, next-header ICMPv6 (58) payload length: 56)
> fe80::200:ff:fe00:1 > fe80::200:ff:fe01:102: [icmp6 sum ok] ICMP6, router
> advertisement, length 56                                                    
> 
>         hop limit 255, Flags [none], pref low, router lifetime 65535s,
> reachable time 0ms, retrans time 0ms
>           source link-address option (1), length 8 (1): 00:00:00:00:00:01
>             0x0000:  0000 0000 0001
>           prefix info option (3), length 32 (4): aef0::/64, Flags [onlink,
> auto], valid time infinity, pref. time infinity
>             0x0000:  40c0 ffff ffff ffff ffff 0000 0000 aef0                
> 
>             0x0010:  0000 0000 0000 0000 0000 0000 0000
> 
> <==== pref is low, but still no other info: dnssl, rdnss, etc.
> 
> [root@dell-per740-12 bz1804576]# ip netns exec server0 ip -6 route list
> default
> default via fe80::200:ff:fe00:1 dev veth0_s0 proto ra metric 1024 expires
> 65440sec hoplimit 255 pref low
> 
> <=== pref is low
> 
> 
> about dnssl,rdnss and route_info in router advertisement triggered by router
> solicitation, shoud I report another bug? or set failqa for this bug?

Ok. I didn't work on the fix for this issue. But the patch addressed only for the router info.

I'd suggest to report another bug as the heading says the issue is for "router preference".
So I don't think we tried to address the rdnss and dnssl.

Thanks
Numan

Comment 7 Jianlin Shi 2020-06-29 00:31:56 UTC
add bz1851788 to track dnssl/rdnss/route_info issue.


set VERIFIED for this bug

Comment 9 errata-xmlrpc 2020-07-15 13:00:54 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, 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:2941


Note You need to log in before you can comment on or make changes to this bug.