LBs on switches are a broken abstraction that never worked correctly and leads to cascading workarounds. Add deprecation warnings in ovn-nbctl when attaching a load balancer to a logical switch via ls-lb-add, and in ovn-northd when processing a logical switch that has load balancers configured.
Reported-by: Ilya Maximets <[email protected]> Suggested-by: Ales Musil <[email protected]> Signed-off-by: Dumitru Ceara <[email protected]> --- NEWS | 2 ++ northd/northd.c | 9 +++++++++ utilities/ovn-nbctl.c | 2 ++ 3 files changed, 13 insertions(+) diff --git a/NEWS b/NEWS index 888946b548..4fdb604db0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ Post v26.03.0 ------------- + - Deprecated load balancers on logical switches. LBs on switches are + a broken abstraction. Use load balancers on logical routers instead. OVN v26.03.0 - xxx xx xxxx -------------------------- diff --git a/northd/northd.c b/northd/northd.c index ac23614172..193021b550 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -3623,6 +3623,15 @@ build_lb_datapaths(const struct hmap *lbs, const struct hmap *lb_groups, continue; } + if (od->nbs->n_load_balancer || od->nbs->n_load_balancer_group) { + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1); + VLOG_WARN_RL(&rl, "LBs on switches are deprecated because " + "supporting LBs on switches is a bad thing and a " + "broken abstraction. Logical switch '%s' has " + "load balancers configured.", + od->nbs->name); + } + for (size_t i = 0; i < od->nbs->n_load_balancer; i++) { const struct uuid *lb_uuid = &od->nbs->load_balancer[i]->header_.uuid; diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c index 0ef2072720..05a5c42a85 100644 --- a/utilities/ovn-nbctl.c +++ b/utilities/ovn-nbctl.c @@ -4203,6 +4203,8 @@ nbctl_ls_lb_add(struct ctl_context *ctx) } /* Insert the load balancer into the logical switch. */ + VLOG_WARN("LBs on switches are deprecated because supporting LBs on " + "switches is a bad thing and a broken abstraction."); nbrec_logical_switch_update_load_balancer_addvalue(ls, new_lb); } -- 2.53.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
