Health check packets were sent as soon as port_binding chassis was
set.
This means that all related flows were potentially not yet installed,
and health check packet got lost.

Reported-at: https://issues.redhat.com/browse/FDP-2649
Signed-off-by: Xavier Simonart <[email protected]>
---
 controller/pinctrl.c | 2 +-
 tests/system-ovn.at  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index f2751cca6..f8d5f9c66 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -7004,7 +7004,7 @@ sync_svc_monitors(struct ovsdb_idl_txn *ovnsb_idl_txn,
             continue;
         }
 
-        if (pb->chassis != our_chassis) {
+        if ((pb->chassis != our_chassis) || (pb->n_up && !pb->up[0])) {
             continue;
         }
 
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index e104a6518..0d70f8ca2 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -4575,9 +4575,12 @@ ovs-vsctl remove interface ovs-sw1-p1 external_ids 
iface-id
 wait_row_count Service_Monitor 2
 wait_row_count Service_Monitor 2 status=offline
 
+# Once port is added, status should be online very soon: if it takes more than 
a few seconds, that's a bug.
+OVS_CTL_TIMEOUT=3
 ovs-vsctl set interface ovs-sw1-p1 external_ids:iface-id=sw1-p1
 wait_row_count Service_Monitor 2
 wait_row_count Service_Monitor 1 status=online
+OVS_CTL_TIMEOUT=30
 
 # Create udp load balancer.
 check ovn-nbctl lb-add lb2 10.0.0.10:80 10.0.0.3:80,20.0.0.3:80 udp
-- 
2.47.1

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

Reply via email to