We were missing monitor conditions when another chassis was
requested-chassis. The port_binding (with requested-chassis set to a
different chassis) was in that case sometimes not monitored.

The additional_chassis field was not monitored neither (and is still
not) as it is redundant with this change and would increase the size
of the SB monitor condition.

The test "Multichassis port I-P processing" sometimes highlited the
issue. It has been modified so that the condition leading to the issue
would occur much more often.

Signed-off-by: Xavier Simonart <[email protected]>
---
 controller/ovn-controller.c |  3 ++-
 tests/ovn.at                | 20 +++++++++++++++-----
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 6396fa898..831f8d00c 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -372,7 +372,8 @@ update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
              * for those. */
             const struct sbrec_port_binding *local_pb
                 = local_binding_get_primary_pb(local_bindings, name);
-            if (local_pb && get_lport_type(local_pb) == LP_VIF) {
+            if (local_pb && get_lport_type(local_pb) == LP_VIF &&
+                local_pb->chassis == chassis) {
                 continue;
             }
             sbrec_port_binding_add_clause_logical_port(&pb, OVSDB_F_EQ, name);
diff --git a/tests/ovn.at b/tests/ovn.at
index 6b49f0583..f4f0dfa7a 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -41517,14 +41517,24 @@ done
 
 wait_for_ports_up
 check ovn-nbctl --wait=hv sync
-
 OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 0])
 
-check ovn-nbctl --wait=hv lsp-set-options multi requested-chassis=hv1,hv2
-OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 4])
+for in in $(seq 1 10); do
+    check ovn-nbctl --wait=hv lsp-set-options multi requested-chassis=hv1,hv2
+    OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 4])
 
-check ovn-nbctl --wait=hv lsp-set-options multi requested-chassis=hv1
-OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 0])
+    check ovn-nbctl --wait=hv lsp-set-options multi requested-chassis=hv1
+    OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 0])
+done
+
+for in in $(seq 1 10); do
+    as hv2 ovn-appctl recompute
+    check ovn-nbctl --wait=hv lsp-set-options multi requested-chassis=hv1,hv2
+    OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 4])
+
+    check ovn-nbctl --wait=hv lsp-set-options multi requested-chassis=hv1
+    OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 0])
+done
 
 check ovn-nbctl --wait=hv lsp-set-options multi requested-chassis=hv1,hv2
 OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int 
table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 4])
-- 
2.47.1

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

Reply via email to