Bug 1826623
| Summary: | ovn won't generate ipv6_prefix when receive prefix delegation packet without status code present | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Fast Datapath | Reporter: | Jianlin Shi <jishi> |
| Component: | ovn2.13 | Assignee: | lorenzo bianconi <lorenzo.bianconi> |
| Status: | CLOSED ERRATA | QA Contact: | Jianlin Shi <jishi> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | FDP 20.D | CC: | ctrautma, jishi, mmichels, ralongi |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ovn2.13-2.13.0-23.el7fdn | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-05-26 14:07:18 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: | |||
tried with following steps:
setup basic env:
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:10.16.56.76:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=10.16.56.76
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
script to add much ports:
[root@kvm-04-guest09 bz1826623]# cat add_port.sh
for num in `seq 4 250`
do
ovn-nbctl lrp-add lr1 lr1-ls$num 00:00:00:00:00:$(printf %x $num) 172.16.1.$num/24
ovn-nbctl ls-add ls$num
ovn-nbctl lsp-add ls$num ls${num}-lr1
ovn-nbctl lsp-set-type ls${num}-lr1 router
ovn-nbctl lsp-set-options ls${num}-lr1 router-port=lr1-ls$num
ovn-nbctl lsp-set-addresses ls${num}-lr1 router
ovn-nbctl set logical_router_port lr1-ls${num} options:prefix=true
done
script to del ports:
[root@kvm-04-guest09 bz1826623]# cat del_port.sh
for num in `seq 4 250`
do
ovn-nbctl lrp-del lr1-ls$num
ovn-nbctl ls-del ls$num
done
test on ovn2.13.0-27:
[root@kvm-04-guest09 ovn2.13.0-30]# rpm -qa | grep -E "openvswitch|ovn"
ovn2.13-2.13.0-27.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch
ovn2.13-central-2.13.0-27.el8fdp.x86_64
openvswitch2.13-2.13.0-18.el8fdp.x86_64
ovn2.13-host-2.13.0-27.el8fdp.x86_64
show VmRSS for ovn-northd after setup:
[root@kvm-04-guest09 bz1826623]# cat /var/run/ovn/ovn-northd.pid
7174
[root@kvm-04-guest09 bz1826623]# grep VmRSS /proc/7174/status
VmRSS: 4728 kB
add port with add_port.sh, then check VmRSS:
[root@kvm-04-guest09 bz1826623]# ./add_port.sh
[root@kvm-04-guest09 bz1826623]# ovn-nbctl list logical_router_port lr1-ls250
_uuid : 7306fe2d-7e95-4027-a79f-9aa7dde0d475
enabled : []
external_ids : {}
gateway_chassis : []
ha_chassis_group : []
ipv6_prefix : ["2001:1db8:3333:110:afb0::/80"]
ipv6_ra_configs : {}
mac : "00:00:00:00:00:fa"
name : lr1-ls250
networks : ["172.16.1.250/24"]
options : {prefix="true"}
peer : []
[root@kvm-04-guest09 bz1826623]# grep VmRSS /proc/7174/status
VmRSS: 207440 kB
<==== memory used increased much
del port with del_port.sh, then check VmRSS:
[root@kvm-04-guest09 bz1826623]# ./del_port.sh
[root@kvm-04-guest09 bz1826623]# grep VmRSS /proc/7174/status
VmRSS: 228872 kB
tested on ovn2.13.0-30:
[root@kvm-04-guest09 ovn2.13.0-30]# rpm -qa | grep -E "openvswitch|ovn"
ovn2.13-2.13.0-30.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch
ovn2.13-central-2.13.0-30.el8fdp.x86_64
openvswitch2.13-2.13.0-18.el8fdp.x86_64
ovn2.13-host-2.13.0-30.el8fdp.x86_64
VmRSS after setup:
[root@kvm-04-guest09 bz1826623]# grep VmRSS /proc/10941/status
VmRSS: 4236 kB
VmRSS after add port:
[root@kvm-04-guest09 bz1826623]# ./add_port.sh
[root@kvm-04-guest09 bz1826623]# ovn-nbctl list logical_router_port lr1-ls250
_uuid : d9dd0f5f-b569-4d4d-aa52-e5d54ed89390
enabled : []
external_ids : {}
gateway_chassis : []
ha_chassis_group : []
ipv6_prefix : ["2001:1db8:3333:110:59be::/80"]
ipv6_ra_configs : {}
mac : "00:00:00:00:00:fa"
name : lr1-ls250
networks : ["172.16.1.250/24"]
options : {prefix="true"}
peer : []
[root@kvm-04-guest09 bz1826623]# grep VmRSS /proc/10941/status
VmRSS: 45268 kB
<=== less memory increased compared to 207440 kB
VmRSS after delete ports:
[root@kvm-04-guest09 bz1826623]# ./del_port.sh
[root@kvm-04-guest09 bz1826623]# grep VmRSS /proc/10941/status
VmRSS: 45268 kB
from above result, less memory is increased after add much ports on ovn2.13.0-30
ignore comment 4. verified on ovn2.13.0-30.el8: setup env: 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:10.16.56.76:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=10.16.56.76 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 [root@kvm-04-guest09 bz1826623]# rpm -qa | grep -E "openvswitch|ovn" ovn2.13-2.13.0-30.el8fdp.x86_64 openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch ovn2.13-central-2.13.0-30.el8fdp.x86_64 openvswitch2.13-2.13.0-18.el8fdp.x86_64 ovn2.13-host-2.13.0-30.el8fdp.x86_64 [root@kvm-04-guest09 ~]# ip netns exec server0 tcpdump -i veth0_s0 -nnle -v 02:44:31.919319 52:2c:33:05:4b:ad > 00:00:00:00:00:01, ethertype IPv6 (0x86dd), length 143: (flowlabel 0x03ea0, hlim 64, next-header UDP (17) payload length: 89) fe80::502c:33ff:fe05:4bad.547 > fe80::200:ff:fe00:1.546: [bad udp cksum 0xcc4b -> 0x323c!] dhcp6 reply (xid=0 (IA_PD IAID:59534 T1:10 T2:15 (IA_PD-prefix 2001:1db8:3333:111::/80 pltime:4294967295 vltime:4294967295)) (client-ID hwaddr type 1 000000000003) (server-ID hwaddr/time type 1 time 642667374 522c33054bad)) <==== no status code option in the dhcp6 reply [root@kvm-04-guest09 bz1826623]# ovn-nbctl list logical_router_port lr1-ls3 _uuid : 33e24999-9e0f-499e-915c-1a4a764ba9b5 enabled : [] external_ids : {} gateway_chassis : [] ha_chassis_group : [] ipv6_prefix : ["2001:1db8:3333:111::/80"] <=== ipv6_prefix is generated ipv6_ra_configs : {} mac : "00:00:00:00:00:03" name : lr1-ls3 networks : ["172.16.1.3/24"] options : {prefix="true"} peer : [] also verified on ovn2.13.0-30.el7: [root@hpe-dl380pgen8-02-vm-13 bz1826623]# rpm -qa | grep -E "openvswitch|ovn" openvswitch2.13-2.13.0-17.el7fdp.x86_64 ovn2.13-2.13.0-30.el7fdp.x86_64 openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch ovn2.13-central-2.13.0-30.el7fdp.x86_64 ovn2.13-host-2.13.0-30.el7fdp.x86_64 o[root@hpe-dl380pgen8-02-vm-13 bz1826623]# ovn-nbctl list logical_router_port lr1-ls3 _uuid : f5cf17eb-3a53-4eaf-98aa-fef3820ef583 enabled : [] external_ids : {} gateway_chassis : [] ha_chassis_group : [] ipv6_prefix : ["2001:1db8:3333:111::/80"] ipv6_ra_configs : {} mac : "00:00:00:00:00:03" name : lr1-ls3 networks : ["172.16.1.3/24"] options : {prefix="true"} peer : [] 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:2317 |
Description of problem: ovn won't generate ipv6_prefix when receive prefix delegation packet without status code present Version-Release number of selected component (if applicable): ovn2.13.0-18 How reproducible: always Steps to Reproduce: 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.48.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.48.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 00:00:00:00:00:01 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 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 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:: /64; } EOF ip netns exec server0 dhcpd -6 -cf ./dhcpd6.conf veth0_s0 sleep 5 ovn-nbctl list logical_router_port lr1-ls1 Actual results: no ipv6_prefix is generated for lr1-ls1 Expected results: ipv6_prefix should be generated Additional info: packets captured on veth0_s0: 02:52:47.630026 00:00:00:00:00:01 > 33:33:00:01:00:02, ethertype IPv6 (0x86dd), length 96: (hlim 255, next-header UDP (17) payload length: 42) fe80::200:ff:fe00:1.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=0 (client-ID hwaddr type 1 000000000001) (IA_PD IAID:49651 T1:4294967295 T2:4294967295)) 02:52:47.631302 8e:06:20:81:19:9e > 00:00:00:00:00:01, ethertype IPv6 (0x86dd), length 143: (flowlabel 0x629b8, hlim 64, next-header UDP (17) payload length: 89) fe80::8c06:20ff:fe81:199e.547 > fe80::200:ff:fe00:1.546: [bad udp cksum 0xc392 -> 0x382e!] dhcp6 advertise (xid=0 (IA_PD IAID:49651 T1:10 T2:15 (IA_PD-prefix 2001:1db8:3333:106::/64 pltime:27000 vltime:43200)) (client-ID hwaddr type 1 000000000001) (server-ID hwaddr/time type 1 time 640753383 0eabdb71449f)) 02:52:47.632017 00:00:00:00:00:01 > 8e:06:20:81:19:9e, ethertype IPv6 (0x86dd), length 143: (hlim 255, next-header UDP (17) payload length: 89) fe80::200:ff:fe00:1.546 > fe80::8c06:20ff:fe81:199e.547: [udp sum ok] dhcp6 request (xid=0 (IA_PD IAID:49651 T1:10 T2:15 (IA_PD-prefix 2001:1db8:3333:106::/64 pltime:27000 vltime:43200)) (client-ID hwaddr type 1 000000000001) (server-ID hwaddr/time type 1 time 640753383 0eabdb71449f)) 02:52:47.632279 8e:06:20:81:19:9e > 00:00:00:00:00:01, ethertype IPv6 (0x86dd), length 143: (flowlabel 0x629b8, hlim 64, next-header UDP (17) payload length: 89) fe80::8c06:20ff:fe81:199e.547 > fe80::200:ff:fe00:1.546: [bad udp cksum 0xc392 -> 0x332e!] dhcp6 reply (xid=0 (IA_PD IAID:49651 T1:10 T2:15 (IA_PD-prefix 2001:1db8:3333:106::/64 pltime:27000 vltime:43200)) (client-ID hwaddr type 1 000000000001) (server-ID hwaddr/time type 1 time 640753383 0eabdb71449f)) <==== no status code option present but https://tools.ietf.org/html/rfc3315#section-22.13 said: If the Status Code option does not appear in a message in which the option could appear, the status of the message is assumed to be Success.