Running ovn-detrace --ovs results in: Traceback (most recent call last): File "/usr/bin/ovn-detrace", line 469, in <module> main() File "/usr/bin/ovn-detrace", line 455, in main print_record_from_cookie(ovsdb_ovnnb, handlers, cookie) File "/usr/bin/ovn-detrace", line 336, in print_record_from_cookie handler.print('[Duplicate uuid cookie]') AttributeError: 'OvsInterfaceHandler' object has no attribute 'print'
tested wit following script: cat setup.sh # start ovn-nb-db, ovn-northd and ovn-sb-db systemctl start ovn-northd # open 6642 port for connection of sb-db ovn-sbctl set-connection ptcp:6642 # open 6641 port for connection of nb-nb ovn-nbctl set-connection ptcp:6641 # add logical switch ls1 ovn-nbctl ls-add ls1 # add port ls1p1 ovn-nbctl lsp-add ls1 ls1p1 # add port ls1p2 ovn-nbctl lsp-add ls1 ls1p2 # setting for ls1p1 and ls1p2 ovn-nbctl lsp-set-addresses ls1p1 aa:17:fd:00:0d:48 ovn-nbctl lsp-set-addresses ls1p2 96:98:57:5f:bc:90 # start ovs systemctl start openvswitch # id number for controller node ovs-vsctl set Open_vSwitch . external-ids:system-id=hv1 # ip and port for southbound db ovs-vsctl set Open_vSwitch . external-ids:ovn-remote=tcp:20.0.30.25:6642 # tunnel type for connection between controller nodes ovs-vsctl set Open_vSwitch . external-ids:ovn-encap-type=geneve # local ip for tunnel ovs-vsctl set Open_vSwitch . external-ids:ovn-encap-ip=20.0.30.25 # start ovn-controller systemctl start ovn-controller # relate physical port with ls1p1 and ls1p2 ovs-vsctl add-port br-int veth1 -- set interface veth1 type=internal external_ids:iface-id=ls1p1 ovs-vsctl add-br br-test ovs-vsctl add-port br-test veth2 -- set interface veth2 type=internal ovs-vsctl add-port br-test veth3 -- set interface veth3 type=internal ovs-vsctl add-port br-test veth4 -- set interface veth4 type=internal on client: [root@dell-per740-42 talk]# cat c2.sh # start ovs systemctl start openvswitch # id number for controller node ovs-vsctl set Open_vSwitch . external-ids:system-id=hv0 # ip and port for southbound db ovs-vsctl set Open_vSwitch . external-ids:ovn-remote=tcp:20.0.30.25:6642 # tunnel type for connection between controller nodes ovs-vsctl set Open_vSwitch . external-ids:ovn-encap-type=geneve # local ip for tunnel ovs-vsctl set Open_vSwitch . external-ids:ovn-encap-ip=20.0.30.26 # start ovn-controller systemctl start ovn-controller # relate physical port with ls1p1 and ls1p2 ovs-vsctl add-port br-int veth2 -- set interface veth2 type=internal external_ids:iface-id=ls1p2 reproduced on ovn20.09.0-4: [root@dell-per740-12 talk]# ovs-appctl ofproto/trace br-int 'in_port='veth1',dl_src=aa:17:fd:00:0d:48,dl_dst=96:98:57:5f:bc:90,dl_type=0x86DD ' > test.flow [root@dell-per740-12 talk]# ovn-detrace --ovs --ovsdb=unix:/var/run/openvswitch/db.sock < test.flow Flow: ipv6,in_port=2,vlan_tci=0x0000,dl_src=aa:17:fd:00:0d:48,dl_dst=96:98:57:5f:bc:90,ipv6_src=::,ipv6_dst=::,ipv6_label=0x00000,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0 bridge("br-int") ---------------- 0. in_port=2, priority 100, cookie 0x70ea0473 set_field:0x1->reg13 set_field:0x3->reg11 set_field:0x2->reg12 set_field:0x1->metadata set_field:0x1->reg14 resubmit(,8) * Logical datapath: "ls1" (46e40a5c-0917-485d-8849-d8530a0fdea8) * Port Binding: logical_port "ls1p1", tunnel_key 1, chassis-name "hv1", chassis-str "dell-per740-12.rhts.eng.pek2.redhat.com" * OVS Interface: veth1 (ls1p1) Traceback (most recent call last): File "/usr/bin/ovn-detrace", line 469, in <module> main() File "/usr/bin/ovn-detrace", line 455, in main print_record_from_cookie(ovsdb_ovnnb, handlers, cookie) File "/usr/bin/ovn-detrace", line 336, in print_record_from_cookie handler.print('[Duplicate uuid cookie]') AttributeError: 'OvsInterfaceHandler' object has no attribute 'print' Verified on 20.09.0-10: [root@dell-per740-12 talk]# ovn-detrace --ovs --ovsdb=unix:/var/run/openvswitch/db.sock < test.flow Flow: ipv6,in_port=2,vlan_tci=0x0000,dl_src=aa:17:fd:00:0d:48,dl_dst=96:98:57:5f:bc:90,ipv6_src=::,ipv6_dst=::,ipv6_label=0x00000,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0 bridge("br-int") ---------------- 0. in_port=2, priority 100, cookie 0x70ea0473 set_field:0x1->reg13 set_field:0x3->reg11 set_field:0x2->reg12 set_field:0x1->metadata set_field:0x1->reg14 ...... output:1 -> output to kernel tunnel * Logical datapath: "ls1" (46e40a5c-0917-485d-8849-d8530a0fdea8) * Port Binding: logical_port "ls1p2", tunnel_key 2, chassis-name "hv0", chassis-str "dell-per740-42.rhts.eng.pek2.redhat.com" Final flow: ipv6,reg0=0x300,reg11=0x3,reg12=0x2,reg13=0x1,reg14=0x1,reg15=0x2,tun_id=0x1,metadata=0x1,in_port=2,vlan_tci=0x0000,dl_src=aa:17:fd:00:0d:48,dl_dst=96:98:57:5f:bc:90,ipv6_src=::,ipv6_dst=::,ipv6_label=0x00000,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0 Megaflow: recirc_id=0,ct_state=-new-est-rpl-trk,ct_label=0/0x1,eth,ipv6,tun_id=0/0xffffff,tun_metadata0=NP,in_port=2,dl_src=00:00:00:00:00:00/01:00:00:00:00:00,dl_dst=96:98:57:5f:bc:90,ipv6_src=::/10,ipv6_dst=::,nw_proto=0,nw_ecn=0,nw_ttl=0,nw_frag=no Datapath actions: set(tunnel(tun_id=0x1,dst=20.0.30.26,ttl=64,tp_dst=6081,geneve({class=0x102,type=0x80,len=4,0x10002}),flags(df|csum|key))),1 [root@dell-per740-12 talk]# rpm -qa | grep -E "openvswitch|ovn" openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch ovn2.13-20.09.0-10.el7fdp.x86_64 kernel-kernel-networking-openvswitch-ovn-common-1.0-13.noarch openvswitch2.13-2.13.0-59.el7fdp.x86_64 ovn2.13-central-20.09.0-10.el7fdp.x86_64 kernel-kernel-networking-openvswitch-ovn-regression-bz1776712_broadcast_limit-1.0-1.noarch python3-openvswitch2.13-2.13.0-59.el7fdp.x86_64 ovn2.13-host-20.09.0-10.el7fdp.x86_64
also Verified on rhel8 version: [root@dell-per740-42 talk]# rpm -qa | grep -E "openvswitch|ovn" openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch python3-openvswitch2.13-2.13.0-67.el8fdp.x86_64 openvswitch2.13-2.13.0-67.el8fdp.x86_64 ovn2.13-host-20.09.0-10.el8fdp.x86_64 ovn2.13-20.09.0-10.el8fdp.x86_64 ovn2.13-central-20.09.0-10.el8fdp.x86_64 [root@dell-per740-42 talk]# ovn-detrace --ovs --ovsdb=unix:/var/run/openvswitch/db.sock < test.flow Flow: ipv6,in_port=1,vlan_tci=0x0000,dl_src=aa:17:fd:00:0d:48,dl_dst=96:98:57:5f:bc:90,ipv6_src=::,ipv6_dst=::,ipv6_label=0x00000,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0 bridge("br-int") ---------------- 0. in_port=1, priority 100, cookie 0x366bf18c set_field:0x1->reg13 set_field:0x3->reg11 set_field:0x2->reg12 set_field:0x1->metadata set_field:0x1->reg14 ...... -> NXM_NX_TUN_METADATA0[16..30] is now 0x1 output:2 -> output to kernel tunnel * Logical datapath: "ls1" (f0ef1a32-7788-4115-974f-5bc81211384f) * Port Binding: logical_port "ls1p2", tunnel_key 2, chassis-name "hv0", chassis-str "dell-per740-12.rhts.eng.pek2.redhat.com" * OVS Interface: ovn-hv0-0 (None) Final flow: ipv6,reg0=0x300,reg11=0x3,reg12=0x2,reg13=0x1,reg14=0x1,reg15=0x2,tun_id=0x1,metadata=0x1,in_port=1,vlan_tci=0x0000,dl_src=aa:17:fd:00:0d:48,dl_dst=96:98:57:5f:bc:90,ipv6_src=::,ipv6_dst=::,ipv6_label=0x00000,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0 Megaflow: recirc_id=0,ct_state=-new-est-rpl-trk,ct_label=0/0x1,eth,ipv6,tun_id=0/0xffffff,tun_metadata0=NP,in_port=1,dl_src=00:00:00:00:00:00/01:00:00:00:00:00,dl_dst=96:98:57:5f:bc:90,ipv6_src=::/10,ipv6_dst=::,nw_proto=0,nw_ecn=0,nw_ttl=0,nw_frag=no Datapath actions: set(tunnel(tun_id=0x1,dst=20.0.30.25,ttl=64,tp_dst=6081,geneve({class=0x102,type=0x80,len=4,0x10002}),flags(df|csum|key))),3
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:5308