Description of problem: ovn-nbctl ls-add sw0 ovn-nbctl lsp-add sw0 sw0-p1 ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" ovs-vsctl add-port br-int p1 -- \ set Interface p1 external_ids:iface-id=sw0-p1 -- \ set Interface p1 type=internal # the port should be up ovn-nbctl lsp-get-up sw0-port1 ovn-sbctl show ovs-vsctl set interface p1 type=\"\" # the ofport of p1 interface will be -1. ovs-vsctl get interface p1 ofport # The logical port should be down. But its not ovn-nbctl lsp-get-up sw0-port1 ovn-sbctl show Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
reproduced with following script on ovn2.13.0-20.06.1-4: 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.50.26:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.50.26 systemctl restart ovn-controller ovn-nbctl ls-add sw0 ovn-nbctl lsp-add sw0 sw0-p1 ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" ovs-vsctl add-port br-int p1 -- \ set Interface p1 external_ids:iface-id=sw0-p1 -- \ set Interface p1 type=internal while ! ovn-sbctl show | grep sw0-p1 do sleep 1 done # the port should be up ovn-nbctl lsp-get-up sw0-p1 ovn-sbctl show ovs-vsctl set interface p1 type=\"\" # the ofport of p1 interface will be -1. ovs-vsctl get interface p1 ofport sleep 5 # The logical port should be down. But its not ovn-nbctl lsp-get-up sw0-p1 ovn-sbctl show result: + ovn-sbctl show + grep sw0-p1 + sleep 1 + ovn-sbctl show + grep sw0-p1 Port_Binding sw0-p1 + ovn-nbctl lsp-get-up sw0-p1 up + ovn-sbctl show Chassis hv1 hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com Encap geneve ip: "20.0.50.26" options: {csum="true"} Port_Binding sw0-p1 + ovs-vsctl set interface p1 'type=""' + ovs-vsctl get interface p1 ofport -1 + sleep 5 + ovn-nbctl lsp-get-up sw0-p1 up <=== still up + ovn-sbctl show Chassis hv1 hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com Encap geneve ip: "20.0.50.26" options: {csum="true"} Port_Binding sw0-p1 [root@hp-dl380pg8-13 bz1861298]# rpm -qa | grep -E "openvswitch|ovn" openvswitch2.13-2.13.0-39.el7fdp.x86_64 ovn2.13-central-20.06.1-4.el7fdp.x86_64 openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch ovn2.13-20.06.1-4.el7fdp.x86_64 ovn2.13-host-20.06.1-4.el7fdp.x86_64 Verified on ovn2.13.0-20.06-6: + ovn-sbctl show + grep sw0-p1 + sleep 1 + ovn-sbctl show + grep sw0-p1 Port_Binding sw0-p1 + ovn-nbctl lsp-get-up sw0-p1 up + ovn-sbctl show Chassis hv1 hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com Encap geneve ip: "20.0.50.26" options: {csum="true"} Port_Binding sw0-p1 + ovs-vsctl set interface p1 'type=""' + ovs-vsctl get interface p1 ofport -1 + sleep 5 + ovn-nbctl lsp-get-up sw0-p1 down <=== status is down + ovn-sbctl show Chassis hv1 hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com Encap geneve ip: "20.0.50.26" options: {csum="true"} [root@hp-dl380pg8-13 bz1861298]# rpm -qa | grep -E "openvswitch|ovn" openvswitch2.13-2.13.0-39.el7fdp.x86_64 ovn2.13-host-20.06.1-6.el7fdp.x86_64 openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch ovn2.13-central-20.06.1-6.el7fdp.x86_64 ovn2.13-20.06.1-6.el7fdp.x86_64
Verified on rhel8 version: + ovs-vsctl add-port br-int p1 -- set Interface p1 external_ids:iface-id=sw0-p1 -- set Interface p1 type=internal + ovn-sbctl show + grep sw0-p1 + sleep 1 + ovn-sbctl show + grep sw0-p1 Port_Binding sw0-p1 + ovn-nbctl lsp-get-up sw0-p1 up + ovn-sbctl show Chassis hv1 hostname: dell-per740-42.rhts.eng.pek2.redhat.com Encap geneve ip: "20.0.50.25" options: {csum="true"} Port_Binding sw0-p1 + ovs-vsctl set interface p1 'type=""' + ovs-vsctl get interface p1 ofport -1 + sleep 5 + ovn-nbctl lsp-get-up sw0-p1 down + ovn-sbctl show Chassis hv1 hostname: dell-per740-42.rhts.eng.pek2.redhat.com Encap geneve ip: "20.0.50.25" options: {csum="true"} [root@dell-per740-42 bz1861298]# rpm -qa | grep -E "openvswitch|ovn" openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch ovn2.13-host-20.06.1-6.el8fdp.x86_64 openvswitch2.13-2.13.0-48.el8fdp.x86_64 ovn2.13-central-20.06.1-6.el8fdp.x86_64 ovn2.13-20.06.1-6.el8fdp.x86_64
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-2020:3488