Bug 1918582
| Summary: | ovn-northd would crash if add the same logical switch port into two logical switch | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Fast Datapath | Reporter: | Jianlin Shi <jishi> |
| Component: | ovn2.13 | Assignee: | Dumitru Ceara <dceara> |
| Status: | CLOSED ERRATA | QA Contact: | Jianlin Shi <jishi> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | FDP 21.A | CC: | ctrautma, dceara, jishi, ralongi, yinxu |
| 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: | 2021-03-15 14:36:03 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: | |||
Fix posted upstream for review: http://patchwork.ozlabs.org/project/ovn/patch/1611232451-9414-1-git-send-email-dceara@redhat.com/ Verified on 20.12.0-9: [root@wsfd-advnetlab20 bz1918582]# ovn-nbctl list logical_switch_port _uuid : e5a3e294-2c74-4c86-9965-f2a337ca22a1 addresses : ["00:00:00:01:02:02 192.168.1.2 2001::2"] dhcpv4_options : [] dhcpv6_options : [] dynamic_addresses : [] enabled : [] external_ids : {} ha_chassis_group : [] name : ls1p2 options : {} parent_name : [] port_security : [] tag : [] tag_request : [] type : "" up : false _uuid : da195142-1a2e-4206-906d-434b2b0d4141 addresses : ["00:00:00:01:01:02 192.168.1.1 2001::1"] dhcpv4_options : [] dhcpv6_options : [] dynamic_addresses : [] enabled : [] external_ids : {} ha_chassis_group : [] name : ls1p1 options : {} parent_name : [] port_security : [] tag : [] tag_request : [] type : "" up : true [root@wsfd-advnetlab20 bz1918582]# ovn-nbctl set logical_switch ls2 ports=e5a3e294-2c74-4c86-9965-f2a337ca22a1 [root@wsfd-advnetlab20 bz1918582]# ovn-nbctl set logical_switch ls2 ports=da195142-1a2e-4206-906d-434b2b0d4141 [root@wsfd-advnetlab20 ~]# tail -f /var/log/ovn/ovn-northd.log 2021-02-01T03:01:51.399Z|00001|vlog|INFO|opened log file /var/log/ovn/ovn-northd.log 2021-02-01T03:01:51.406Z|00002|ovn_northd|INFO|OVN internal version is : [20.12.0-20.13.0-52.0] 2021-02-01T03:01:51.406Z|00003|reconnect|INFO|unix:/run/ovn/ovnnb_db.sock: connecting... 2021-02-01T03:01:51.406Z|00004|reconnect|INFO|unix:/run/ovn/ovnsb_db.sock: connecting... 2021-02-01T03:01:51.406Z|00005|reconnect|INFO|unix:/run/ovn/ovnnb_db.sock: connected 2021-02-01T03:01:51.406Z|00006|reconnect|INFO|unix:/run/ovn/ovnsb_db.sock: connected 2021-02-01T03:01:51.407Z|00007|ovn_northd|INFO|ovn-northd lock acquired. This ovn-northd instance is now active. 2021-02-01T03:02:31.569Z|00008|ovn_northd|WARN|duplicate logical port ls1p2 2021-02-01T03:02:48.829Z|00009|ovn_northd|WARN|Dropped 1 log messages in last 17 seconds (most recently, 17 seconds ago) due to excessive rate 2021-02-01T03:02:48.829Z|00010|ovn_northd|WARN|duplicate logical port ls1p1 2021-02-01T03:03:10.755Z|00011|ovn_northd|WARN|Dropped 5 log messages in last 22 seconds (most recently, 22 seconds ago) due to excessive rate 2021-02-01T03:03:10.755Z|00012|ovn_northd|WARN|duplicate logical port ls1p1 <=== not crash 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:0836 |
Description of problem: ovn-northd would crash if add the same logical switch port into two logical switch Version-Release number of selected component (if applicable): ovn2.13-20.12.0-1 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:[2620:52:0:136b:e643:4bff:fe17:f67c]:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=1.1.173.25 ovs-vsctl set open . external_ids:system-id=hv1 external_ids:ovn-remote=tcp:[2620:52:0:136b:e643:4bff:fe17:f67c]:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=1111:173::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 ip netns exec server0 ip -6 addr add 2001::1/64 dev veth0_s0 ip netns exec server0 ip route add default via 192.168.1.254 dev veth0_s0 ip netns exec server0 ip -6 route add default via 2001::a 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 192.168.1.1 2001::1" ovn-nbctl lsp-add ls1 ls1p2 ovn-nbctl lsp-set-addresses ls1p2 "00:00:00:01:02:02 192.168.1.2 2001::2" ovn-nbctl ls-add ls2 ovn-nbctl set logical_switch ls2 ports=$uuid_ls1p1 Actual results: ovn-northd crash: [root@wsfd-advnetlab20 ~]# grep crash /var/log/ovn/ovn-northd.log 2021-01-21T06:02:07.062Z|00003|daemon_unix(monitor)|ERR|1 crashes: pid 140776 died, killed (Segmentation fault), restarting 2021-01-21T06:02:07.077Z|00005|daemon_unix(monitor)|WARN|2 crashes: pid 140919 died, killed (Segmentation fault), waiting until 10 seconds since last restart Expected results: no crash Additional info: [root@wsfd-advnetlab20 test]# ovn-nbctl list logical_switch _uuid : 9d750889-3ba0-4113-bf6f-599dcc10976e acls : [] dns_records : [] external_ids : {} forwarding_groups : [] load_balancer : [] name : ls2 other_config : {} ports : [] qos_rules : [] _uuid : 4afbbd6a-ffd4-4391-9fdc-559fbadb06f5 acls : [] dns_records : [] external_ids : {} forwarding_groups : [] load_balancer : [] name : ls1 other_config : {} ports : [991d854e-e458-4f59-a5ea-c9372b498228, aea9e3d9-fb60-4dee-ab23-927b84493e8e] qos_rules : [] [root@wsfd-advnetlab20 test]# ovn-nbctl set logical_switch ls2 ports=991d854e-e458-4f59-a5ea-c9372b498228 [root@wsfd-advnetlab20 ~]# grep crash /var/log/ovn/ovn-northd.log 2021-01-21T06:02:07.062Z|00003|daemon_unix(monitor)|ERR|1 crashes: pid 140776 died, killed (Segmentation fault), restarting 2021-01-21T06:02:07.077Z|00005|daemon_unix(monitor)|WARN|2 crashes: pid 140919 died, killed (Segmentation fault), waiting until 10 seconds since last restart 2021-01-21T06:02:17.077Z|00006|daemon_unix(monitor)|ERR|2 crashes: pid 140919 died, killed (Segmentation fault), restarting 2021-01-21T06:02:17.093Z|00008|daemon_unix(monitor)|WARN|3 crashes: pid 140924 died, killed (Segmentation fault), waiting until 10 seconds since last restart [root@wsfd-advnetlab20 ~]# rpm -qa | grep -E "ovn2.13|openvswitch2.13" openvswitch2.13-2.13.0-80.el8fdp.x86_64 ovn2.13-20.12.0-1.el8fdp.x86_64 ovn2.13-central-20.12.0-1.el8fdp.x86_64 ovn2.13-host-20.12.0-1.el8fdp.x86_64