When the logical router is disabled it is not populated in the datapaths and is not internally available to I-P engine in the hmap. This could lead to a crash during I-P processing:
To fix that make sure we process incrementally only LR that are enabled. Reported-at: https://issues.redhat.com/browse/FDP-571 Signed-off-by: Ales Musil <amu...@redhat.com> --- northd/northd.c | 5 +++++ tests/ovn-northd.at | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/northd/northd.c b/northd/northd.c index 37f443e70..b834f1274 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -4689,6 +4689,11 @@ fail: static bool lr_changes_can_be_handled(const struct nbrec_logical_router *lr) { + /* We can't do I-P processing when the router is disabled. */ + if (!lrouter_is_enabled(lr)) { + return false; + } + /* Check if the columns are changed in this row. */ enum nbrec_logical_router_column_id col; for (col = 0; col < NBREC_LOGICAL_ROUTER_N_COLUMNS; col++) { diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index be006fb32..4f59a64db 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -11452,6 +11452,13 @@ check_engine_stats lflow recompute nocompute check_engine_stats sync_to_sb_lb recompute compute CHECK_NO_CHANGE_AFTER_RECOMPUTE +check ovn-nbctl --wait=sb lr-add lr2 -- set logical_router lr2 enabled=false +check as northd ovn-appctl -t ovn-northd inc-engine/clear-stats +check ovn-nbctl --wait=sb lb-add lb4 10.0.0.40:4040 10.0.40.40:4050 \ + -- lr-lb-add lr2 lb4 +check_engine_stats northd recompute nocompute +CHECK_NO_CHANGE_AFTER_RECOMPUTE + AT_CLEANUP ]) -- 2.44.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev