Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 2151066

Summary: ovn-controller doesn't create mac binding entries when it is upgraded to latest OVN (22.12) until the central components are upgraded too.
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Numan Siddique <nusiddiq>
Component: ovn22.09Assignee: Ales Musil <amusil>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: FDP 21.KCC: amusil, ctrautma, jiji, jishi, mmichels
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn22.09-22.09.0-31.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-09 00:27:09 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:

Description Numan Siddique 2022-12-06 03:29:15 UTC
Description of problem:

When ovn-controllers are upgraded to to-be released OVN version 22.12 before the central components,  they do not create any mac binding entries until the central components are upgraded too.

Below error messages are seen in the logs

--

2022-12-05T23:50:30.621Z|09640|jsonrpc|DBG|tcp:170.168.0.2:6642: send request, method="transact", params=["OVN_Southbound",{"uuid-name":"rowdb027db0_41dc_4ca0_a032_ac1bf2cb646b","row":{"ip":"172.16.0.50","mac":"30:54:00:00:00:50","logical_port":"lr0-public","datapath":["uuid","41f6827b-94a5-412a-8662-8565fbf3aa73"],"timestamp":1670284230620},"op":"insert","table":"MAC_Binding"},{"comment":"ovn-controller","op":"comment"}], id=37
...
...
2022-12-05T23:50:30.622Z|09684|jsonrpc|DBG|tcp:170.168.0.2:6642: received reply, result=[{"syntax":"{\"datapath\":[\"uuid\",\"41f6827b-94a5-412a-8662-8565fbf3aa73\"],\"ip\":\"172.16.0.50\",\"logical_port\":\"lr0-public\",\"mac\":\"30:54:00:00:00:50\",\"timestamp\":1670284230620}","details":"No column timestamp in table MAC_Binding.","error":"unknown column"},null], id=37

----

If there is an ongoing traffic  which requires learning the mac binding, 2 problems are observed
 1.  there will be an upcall for every packet since mac binding entry is not created.
 2. There will be full recompute all the time due to the txn failure.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 OVN Bot 2023-01-13 15:40:31 UTC
ovn22.09 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2160762

Comment 5 Jianlin Shi 2023-01-17 01:41:25 UTC
I tried to test with following steps, but failed to reproduce:
1. install ovn22.06-22.06.0-24
2. setup ovn with following script:
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:127.0.0.1:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=127.0.0.1 external_ids:ovn-monitor-all=true
systemctl restart ovn-controller

ovs-vsctl add-br br-ex
ovs-vsctl set open . external_ids:ovn-bridge-mappings=phynet:br-ex
                                                                                                
ovn-nbctl ls-add ls1                                                                   
ovn-nbctl lsp-add ls1 ls1p1                                                                     
ovn-nbctl lsp-set-addresses ls1p1 "00:00:00:01:01:01 192.168.1.1 2001::1"
ovn-nbctl lsp-add ls1 ls1p2 
ovn-nbctl lsp-set-addresses ls1p2 "00:00:00:01:01:02 192.168.1.2 2001::2"
                                                    
ovn-nbctl lr-add lr1                                                
ovn-nbctl lrp-add lr1 lr1-ls1 00:00:00:00:00:01 192.168.1.254/24 2001::a/64
ovn-nbctl lsp-add ls1 ls1-lr1
ovn-nbctl lsp-set-addresses ls1-lr1 "00:00:00:00:00:01 192.168.1.254 2001::a"
ovn-nbctl lsp-set-type ls1-lr1 router
ovn-nbctl lsp-set-options ls1-lr1 router-port=lr1-ls1    
                                  
ovn-nbctl lrp-add lr1 lr1-ls2 00:00:00:00:00:02 192.168.2.254/24 2002::a/64
                                               
ovn-nbctl ls-add ls2                                          
ovn-nbctl lsp-add ls2 ls2-lr1                              
ovn-nbctl lsp-set-addresses ls2-lr1 "00:00:00:00:00:02 192.168.2.254 2002::a"
ovn-nbctl lsp-set-type ls2-lr1 router
ovn-nbctl lsp-set-options ls2-lr1 router-port=lr1-ls2

ovn-nbctl lsp-add ls2 ln_port
ovn-nbctl lsp-set-type ln_port localnet
ovn-nbctl lsp-set-addresses ln_port unknown
ovn-nbctl lsp-set-options ln_port network_name=phynet
                                                               
ovs-vsctl add-port br-int ls1p1 -- set interface ls1p1 type=internal external_ids:iface-id=ls1p1
                                                                                
ip netns add ls1p1                     
ip link set ls1p1 netns ls1p1              
ip netns exec ls1p1 ip link set ls1p1 address 00:00:00:01:01:01
ip netns exec ls1p1 ip link set ls1p1 up
ip netns exec ls1p1 ip addr add 192.168.1.1/24 dev ls1p1
ip netns exec ls1p1 ip addr add 2001::1/64 dev ls1p1
ip netns exec ls1p1 ip route add default via 192.168.1.254 dev ls1p1
ip netns exec ls1p1 ip -6 route add default via 2001::a dev ls1p1

ovs-vsctl add-port br-int ls1p2 -- set interface ls1p2 type=internal external_ids:iface-id=ls1p2
                                                                                
ip netns add ls1p2                     
ip link set ls1p2 netns ls1p2              
ip netns exec ls1p2 ip link set ls1p2 address 00:00:00:01:01:02
ip netns exec ls1p2 ip link set ls1p2 up
ip netns exec ls1p2 ip addr add 192.168.1.2/24 dev ls1p2
ip netns exec ls1p2 ip addr add 2001::2/64 dev ls1p2
ip netns exec ls1p2 ip route add default via 192.168.1.254 dev ls1p2
ip netns exec ls1p2 ip -6 route add default via 2001::a dev ls1p2

ovs-vsctl add-port br-ex ext0 -- set interface ext0 type=internal
ip netns add ext0
ip link set ext0 netns ext0
ip netns exec ext0 ip link set ext0 up
ip netns exec ext0 ip addr add 192.168.2.100/24 dev ext0
ip netns exec ext0 ip addr add 2002::100/64 dev ext0
ip netns exec ext0 ip route add default via 192.168.2.254
ip netns exec ext0 ip -6 route add default via 2002::a

ovn-appctl -t ovn-controller vlog/set jsonrpc DBG

3. install ovn22.09-22.09.0-11:
rpm -ivh ovn22.09-22.09.0-11.el8fdp.x86_64.rpm ovn22.09-host-22.09.0-11.el8fdp.x86_64.rpm --force

4. run "ip netns exec ls1p1 ping 192.168.2.100 -c 1"
5. the log in ovn-controller.log:

2023-01-17T01:39:46.182Z|00956|jsonrpc|DBG|tcp:127.0.0.1:6642: send request, method="transact", params=["OVN_Southbound",{"uuid-name":"rowf1541efc_d7d5_4584_a010_3af1f9d872ac","row":{"ip":"192.168.2.100","mac":"de:97:6e:2c:7c:85","logical_port":"lr1-ls2","datapath":["uuid","fcb927e1-185b-4f0f-971d-a12cba07123b"]},"op":"insert","table":"MAC_Binding"},{"comment":"ovn-controller","op":"comment"}], id=20
...
2023-01-17T01:39:46.183Z|00995|jsonrpc|DBG|tcp:127.0.0.1:6642: received notification, method="update3", params=[["monid","OVN_Southbound"],"00000000-0000-0000-0000-000000000000",{"MAC_Binding":{"57c9c38c-95ee-4d76-ae16-15cc944efa4c":{"insert":{"ip":"192.168.2.100","mac":"de:97:6e:2c:7c:85","logical_port":"lr1-ls2","datapath":["uuid","fcb927e1-185b-4f0f-971d-a12cba07123b"]}}}}]

Hi, Ales,anything wrong with the steps? could you help to check, thanks

Comment 6 Ales Musil 2023-01-17 06:44:59 UTC
Hi Jianlin,
did you restart controller after update? It seems to run the version without timestamp in MAC binding. 
Everything else seems to be correct. 

Thanks,
Ales

Comment 7 Jianlin Shi 2023-01-17 07:12:03 UTC
after the first 3 steps in comment 5, continue to run the following step:
4. systemctl restart ovn-controller
ovn-appctl -t ovn-controller vlog/set jsonrpc DBG 
5. run "ip netns exec ls1p1 ping 192.168.2.100 -c 1"
6. the log in ovn-controller.log:

[root@dell-per740-66 ovn]# grep MAC_Binding /var/log/ovn/ovn-controller.log                           
2023-01-17T07:10:46.804Z|00010|ovsdb_idl|WARN|MAC_Binding table in OVN_Southbound database lacks timestamp column (database needs upgrade?)
2023-01-17T07:10:53.223Z|00267|jsonrpc|DBG|tcp:127.0.0.1:6642: send request, method="transact", params=["OVN_Southbound",{"uuid-name":"rowa6211866_7528_44d0_b0e1_3b34e5cd4b58","row":{"ip":"192.168.2.100","mac":"de:83:2e:d8:54:ed","logical_port":"lr1-ls2","datapath":["uuid","c3f6ed83-5726-4736-b093-65dc5c7b7acf"],"timestamp":1673939453223},"op":"insert","table":"MAC_Binding"},{"comment":"ovn-controller","op":"comment"}], id=16
2023-01-17T07:10:53.224Z|00307|jsonrpc|DBG|tcp:127.0.0.1:6642: received reply, result=[{"syntax":"{\"datapath\":[\"uuid\",\"c3f6ed83-5726-4736-b093-65dc5c7b7acf\"],\"ip\":\"192.168.2.100\",\"logical_port\":\"lr1-ls2\",\"mac\":\"de:83:2e:d8:54:ed\",\"timestamp\":1673939453223}","details":"No column timestamp in table MAC_Binding.","error":"unknown column"},null], id=16
2023-01-17T07:10:53.224Z|00308|ovsdb_idl|WARN|transaction error: {"details":"No column timestamp in table MAC_Binding.","error":"unknown column","syntax":"{\"datapath\":[\"uuid\",\"c3f6ed83-5726-4736-b093-65dc5c7b7acf\"],\"ip\":\"192.168.2.100\",\"logical_port\":\"lr1-ls2\",\"mac\":\"de:83:2e:d8:54:ed\",\"timestamp\":1673939453223}"}
2023-01-17T07:10:58.294Z|00933|jsonrpc|DBG|tcp:127.0.0.1:6642: send request, method="transact", params=["OVN_Southbound",{"uuid-name":"row5f229dd8_c70d_4e1d_86b6_7e29111caf9b","row":{"ip":"192.168.2.100","mac":"de:83:2e:d8:54:ed","logical_port":"lr1-ls2","datapath":["uuid","c3f6ed83-5726-4736-b093-65dc5c7b7acf"],"timestamp":1673939458294},"op":"insert","table":"MAC_Binding"},{"comment":"ovn-controller","op":"comment"}], id=17
2023-01-17T07:10:58.295Z|00973|jsonrpc|DBG|tcp:127.0.0.1:6642: received reply, result=[{"syntax":"{\"datapath\":[\"uuid\",\"c3f6ed83-5726-4736-b093-65dc5c7b7acf\"],\"ip\":\"192.168.2.100\",\"logical_port\":\"lr1-ls2\",\"mac\":\"de:83:2e:d8:54:ed\",\"timestamp\":1673939458294}","details":"No column timestamp in table MAC_Binding.","error":"unknown column"},null], id=17
2023-01-17T07:10:58.295Z|00974|ovsdb_idl|WARN|transaction error: {"details":"No column timestamp in table MAC_Binding.","error":"unknown column","syntax":"{\"datapath\":[\"uuid\",\"c3f6ed83-5726-4736-b093-65dc5c7b7acf\"],\"ip\":\"192.168.2.100\",\"logical_port\":\"lr1-ls2\",\"mac\":\"de:83:2e:d8:54:ed\",\"timestamp\":1673939458294}"}

[root@dell-per740-66 ~]# ovn-sbctl list mac_binding
2023-01-17T07:10:57Z|00001|ovsdb_idl|WARN|MAC_Binding table in OVN_Southbound database lacks timestamp column (database needs upgrade?)

[root@dell-per740-66 22.09-11]# rpm -qa | grep ovn                                                    
ovn22.09-22.09.0-11.el8fdp.x86_64                                                                     
ovn22.06-22.06.0-24.el8fdp.x86_64                                                                     
ovn22.06-host-22.06.0-24.el8fdp.x86_64                                                                
ovn22.09-host-22.09.0-11.el8fdp.x86_64                                                                
ovn22.06-central-22.06.0-24.el8fdp.x86_64 


Verified on ovn22.09-22.09.0-31.el8:

2023-01-17T07:07:29Z|00001|ovsdb_idl|WARN|MAC_Binding table in OVN_Southbound database lacks timestamp column (database needs upgrade?)
_uuid               : 859ea10a-61d3-4a96-a0fa-8a8a90169f30                                            
datapath            : 35a1e850-7423-4305-bf41-3b750e5421fb                                            
ip                  : "192.168.2.100"                                                                 
logical_port        : lr1-ls2                                                                         
mac                 : "ee:df:68:b3:0f:ab"                                                             
timestamp           : 0                                                                               
[root@dell-per740-66 bz2151066]# rpm -qa | grep ovn                                                   
ovn22.06-host-22.06.0-24.el8fdp.x86_64                                                                
ovn22.06-central-22.06.0-24.el8fdp.x86_64                                                             
ovn22.09-22.09.0-31.el8fdp.x86_64                                                                     
ovn22.06-22.06.0-24.el8fdp.x86_64                                                                     
ovn22.09-host-22.09.0-31.el8fdp.x86_64

[root@dell-per740-66 ovn]# grep MAC_Binding /var/log/ovn/ovn-controller.log
2023-01-17T07:06:31.619Z|00010|ovsdb_idl|WARN|MAC_Binding table in OVN_Southbound database lacks timestamp column (database needs upgrade?)
2023-01-17T07:07:09.971Z|00191|jsonrpc|DBG|tcp:127.0.0.1:6642: send request, method="transact", params=["OVN_Southbound",{"uuid-name":"row9c824295_de75_4f60_a5a2_44aa356a001c","row":{"ip":"192.168.2.100","mac":"ee:df:68:b3:0f:ab","logical_port":"lr1-ls2","datapath":["uuid","35a1e850-7423-4305-bf41-3b750e5421fb"]},"op":"insert","table":"MAC_Binding"},{"comment":"ovn-controller","op":"comment"}], id=18
2023-01-17T07:07:09.972Z|00231|jsonrpc|DBG|tcp:127.0.0.1:6642: received notification, method="update3", params=[["monid","OVN_Southbound"],"00000000-0000-0000-0000-000000000000",{"MAC_Binding":{"859ea10a-61d3-4a96-a0fa-8a8a90169f30":{"insert":{"ip":"192.168.2.100","mac":"ee:df:68:b3:0f:ab","logical_port":"lr1-ls2","datapath":["uuid","35a1e850-7423-4305-bf41-3b750e5421fb"]}}}}]

Comment 9 errata-xmlrpc 2023-02-09 00:27:09 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 (ovn22.09 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-2023:0686