Hi Rosemarie

Thanks for the feedback.

On Thu, Nov 12, 2026 at 11:45 PM Rosemarie O'Riorden <[email protected]>
wrote:

> Hi Xavier, thanks for the fix!
>
> My one question is: should the Fixes tag be what it is? I found commits
> 505ceec8a and 280bef8b6 which specifically handle load balancer changes
> for logical switches and routers, and added the code blocks you edited,
> so they seem very relevant.
>
Very good question!
I ran git bisect before adding the Fixes tag, and it points precisely to
the commit where the test starts failing: "lflow-mgr: Remove the
ovn_datapath from ovn_lflow."
I agree that the two patches you mention (handling LB/LB-group changes for
switches and routers) made the incremental lb_data tracking fragile. But
the test passes cleanly on top of them alone.
It's the later, seemingly unrelated, od->dp refactor that actually exposes
the missing "changed = true" and triggers the assert.
So I think we should keep the Fixes tag as it is now. WDYT? Maybe a
maintainer can give us their perspective too on what the Fixes tag should
be in this case.

>
> Otherwise this looks good to me, so:
> Acked-by: Rosemarie O'Riorden <[email protected]>
>
> Take care,
> Rosemarie
>
Thanks again
Xavier

> On 11/10/26 3:50 AM, Xavier Simonart via dev wrote:
> > When a load balancer group was removed from a switch in the same
> > transaction as the switch was deleted, this resulted in an assert [0]
> > in ovn.
> >
> > A similar issue could occur when lbg was removed from a router (but
> > resulted in different symptoms i.e. commit failures).
> >
> > [0] northd/lflow-mgr.c:1233: assertion dp_bitmap_len failed in
> do_ovn_lflow_add()
> >
> > Stack trace:
> > 6  ovs_assert_failure at lib/util.c:87
> > 7  do_ovn_lflow_add at northd/lflow-mgr.c:1233
> > 8  lflow_table_add_lflow__ at northd/lflow-mgr.c:868
> > 9  lflow_table_add_lflow at northd/lflow-mgr.c:992
> > 10 build_lb_rules_pre_stateful at northd/northd.c:8948
> > 11 build_lswitch_flows_for_lb at northd/northd.c:14255
> > 12 build_lswitch_flows_for_lb at northd/northd.c:14222
> > 13 build_lflows_thread at northd/northd.c:20911
> >
> > Fixes: 1dfaa516b00b ("lflow-mgr: Remove the ovn_datapath from
> ovn_lflow.")
> > Signed-off-by: Xavier Simonart <[email protected]>
> > ---
> >  northd/en-lb-data.c |  2 ++
> >  tests/ovn-northd.at | 49 +++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 51 insertions(+)
> >
> > diff --git a/northd/en-lb-data.c b/northd/en-lb-data.c
> > index 3bc2e0443..c0465cbaa 100644
> > --- a/northd/en-lb-data.c
> > +++ b/northd/en-lb-data.c
> > @@ -399,6 +399,7 @@ lb_data_synced_logical_switch_handler(struct
> engine_node *node, void *data)
> >          if (od_lb_data) {
> >              hmap_remove(&lb_data->ls_lb_map, &od_lb_data->hmap_node);
> >              hmapx_add(&trk_lb_data->deleted_od_lb_data, od_lb_data);
> > +            changed = true;
> >          }
> >      }
> >
> > @@ -479,6 +480,7 @@ lb_data_synced_logical_router_handler(struct
> engine_node *node, void *data)
> >          if (od_lb_data) {
> >              hmap_remove(&lb_data->lr_lb_map, &od_lb_data->hmap_node);
> >              hmapx_add(&trk_lb_data->deleted_od_lb_data, od_lb_data);
> > +            changed = true;
> >          }
> >      }
> >
> > diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> > index 6c37337ad..46b29ba5b 100644
> > --- a/tests/ovn-northd.at
> > +++ b/tests/ovn-northd.at
> > @@ -25340,3 +25340,52 @@ OVN_CLEANUP_NORTHD
> >  AT_CLEANUP
> >  ])
> >
> > +OVN_FOR_EACH_NORTHD_NO_HV([
> > +AT_SETUP([Remove lb group and delete switch in the same txn])
> > +ovn_start
> > +
> > +check ovn-nbctl ls-add sw0
> > +check ovn-nbctl ls-add sw1
> > +
> > +check ovn-nbctl lb-add lb0 172.16.0.10:80 10.0.0.2:80
> > +lb0_uuid=$(fetch_column nb:load_balancer _uuid name=lb0)
> > +lbg_uuid=$(ovn-nbctl create load_balancer_group name=lbg0
> load_balancer=$lb0_uuid)
> > +check ovn-nbctl --wait=sb set logical_switch sw1
> load_balancer_group=$lbg_uuid
> > +
> > +sleep_northd
> > +check ovn-nbctl remove logical_switch sw1 load_balancer_group $lbg_uuid
> > +check ovn-nbctl ls-del sw0
> > +check ovn-nbctl ls-del sw1
> > +wake_up_northd
> > +
> > +check ovn-nbctl --wait=sb sync
> > +
> > +OVN_CLEANUP_NORTHD
> > +AT_CLEANUP
> > +])
> > +
> > +OVN_FOR_EACH_NORTHD_NO_HV([
> > +AT_SETUP([Remove lb group and delete router in the same txn])
> > +ovn_start
> > +
> > +check ovn-nbctl lr-add r0
> > +check ovn-nbctl lr-add r1
> > +
> > +check ovn-nbctl lb-add lb0 172.16.0.10:80 10.0.0.2:80
> > +lb0_uuid=$(fetch_column nb:load_balancer _uuid name=lb0)
> > +lbg_uuid=$(ovn-nbctl create load_balancer_group name=lbg0
> load_balancer=$lb0_uuid)
> > +check ovn-nbctl --wait=sb add logical_router r1 load_balancer_group
> $lbg_uuid
> > +
> > +sleep_northd
> > +check ovn-nbctl remove logical_router r1 load_balancer_group $lbg_uuid
> > +check ovn-nbctl lr-del r0
> > +check ovn-nbctl lr-del r1
> > +wake_up_northd
> > +
> > +check ovn-nbctl --wait=sb sync
> > +
> > +AT_CHECK([grep -q "referential integrity violation"
> northd/ovn-northd.log], [1])
> > +
> > +OVN_CLEANUP_NORTHD
> > +AT_CLEANUP
> > +])
>
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to