Load balancers were never added to this LB group.

Reported-at: 
https://patchwork.ozlabs.org/project/ovn/patch/[email protected]/
Fixes: f4a66b7871d6 ("tutorial: Add developer performance benchmark.")
Assisted-by: Claude Code, Opus 5
Signed-off-by: Rosemarie O'Riorden <[email protected]>
---
 tutorial/ovn-benchmark.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tutorial/ovn-benchmark.py b/tutorial/ovn-benchmark.py
index d2d4bb9fd..660011aa7 100755
--- a/tutorial/ovn-benchmark.py
+++ b/tutorial/ovn-benchmark.py
@@ -748,8 +748,17 @@ def create_explicit_lbs(idl, n, n_vips, n_backends, 
routers, switches):
     """Create explicit (non-templated) load balancers.
 
     Uses explicit (non-templated) LBs to maximize memory usage for
-    regression testing.
+    regression testing.  Each LB is added to the 'lbg' load balancer
+    group as well as directly to the router and switch.
     """
+    lbg = None
+    for row in idl.tables['Load_Balancer_Group'].rows.values():
+        if row.name == 'lbg':
+            lbg = row
+            break
+    if not lbg:
+        die('Missing load balancer group lbg')
+
     for i in range(n):
         lr = routers.get(f'gw-{i}')
         ls = switches.get(f'ls-{i}')
@@ -782,6 +791,7 @@ def create_explicit_lbs(idl, n, n_vips, n_backends, 
routers, switches):
                 ','.join(f'[fd42:{k:x}::{j1:x}:{j2:x}]:{port}'
                          for k in range(n_backends)))
             lb.protocol = 'tcp'
+            lbg.addvalue('load_balancer', lb.uuid)
             lr.addvalue('load_balancer', lb.uuid)
             ls.addvalue('load_balancer', lb.uuid)
             if txn.commit_block() != ovs.db.idl.Transaction.SUCCESS:
-- 
2.56.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to