Skip to content

Commit 8162661

Browse files
dcearaalmusil
authored andcommitted
northd: Ignore LRP.status write-only column in northd.
The column was added to expose DGP information to the CMS but ovn-northd never reads it and shouldn't be notified about its changes. The CMS should also never write to it. Omit updates to it, otherwise ovn-northd unnecessarily wakes up after its own transaction that set it was committed in the NB. Even worse, these updates break incremental processing of router datapaths (if they're the only changes that happened in the NB) because lr_changes_can_be_handled() assumes it's a relevant LRP change. Update the existing tests accordingly. Fixes: 19164b0 ("Expose distributed gateway port information in NB DB") Signed-off-by: Dumitru Ceara <dceara@redhat.com> Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Ales Musil <amusil@redhat.com> (cherry picked from commit 36b9ca9)
1 parent 454fdb1 commit 8162661

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

northd/ovn-northd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,8 @@ main(int argc, char *argv[])
886886
ovsdb_idl_omit_alert(ovnnb_idl_loop.idl, &nbrec_nb_global_col_hv_cfg);
887887
ovsdb_idl_omit_alert(ovnnb_idl_loop.idl,
888888
&nbrec_nb_global_col_hv_cfg_timestamp);
889+
ovsdb_idl_omit_alert(ovnnb_idl_loop.idl,
890+
&nbrec_logical_router_port_col_status);
889891

890892
/* Ignore northbound external IDs, except for logical switch, router and
891893
* their ports, for which the external IDs are propagated to corresponding

tests/ovn-northd.at

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,6 @@ check ovn-nbctl --wait=sb sync
303303
# Check for the hosting-chassis status being set by northd
304304
wait_row_count nb:Logical_Router_Port 1 name=lrp1 status:hosting-chassis=ch1
305305

306-
# Clear the hosting-chassis status from LRP and assert northd repopulates it
307-
check ovn-nbctl remove logical_router_port lrp1 status hosting-chassis
308-
check ovn-nbctl --wait=sb sync
309-
wait_row_count nb:Logical_Router_Port 1 name=lrp1 status:hosting-chassis=ch1
310-
311306
# Now remove the chassis from the port binding record and assert that the
312307
# hosting-chassis status was removed by northd
313308
check ovn-sbctl clear Port_Binding cr-lrp1 chassis
@@ -11513,12 +11508,10 @@ check as northd ovn-appctl -t ovn-northd inc-engine/clear-stats
1151311508
check ovn-nbctl --wait=sb lrp-set-gateway-chassis lrp hv1
1151411509
wait_column "hosting-chassis=hv1" nb:Logical_Router_Port status name=lrp
1151511510

11516-
# There will be 3 recomputes of northd engine node
11511+
# There will be 2 recomputes of northd engine node
1151711512
# 1. missing handler for input NB_logical_router
1151811513
# 2. missing handler for input SB_ha_chassis_group
11519-
# 3. missing handler for input NB_logical_router when ovn-northd
11520-
# updates the hosting-chassis option in NB_logical_router_port.
11521-
check_recompute_counter 3 3
11514+
check_recompute_counter 2 2
1152211515
CHECK_NO_CHANGE_AFTER_RECOMPUTE
1152311516

1152411517
check as northd ovn-appctl -t ovn-northd inc-engine/clear-stats

0 commit comments

Comments
 (0)