The recompute was requested when the commit failed, however the
engine run might have happened later than expected. This was caused
by poll_block() call, which was waiting for any event in the loop.
Make sure that the engine runs right away by calling
poll_immediate_wake() which ensures that the poll_block() returns
right away without any further waiting.

Reported-at: https://issues.redhat.com/browse/FDP-753
Signed-off-by: Ales Musil <[email protected]>
---
 controller/ovn-controller.c | 1 +
 northd/ovn-northd.c         | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index c48667887..8b8ff3a92 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -5816,6 +5816,7 @@ main(int argc, char *argv[])
         if (!ovsdb_idl_loop_commit_and_wait(&ovnsb_idl_loop)) {
             VLOG_INFO("OVNSB commit failed, force recompute next time.");
             engine_set_force_recompute(true);
+            poll_immediate_wake();
         }
 
         int ovs_txn_status = ovsdb_idl_loop_commit_and_wait(&ovs_idl_loop);
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index d71114f35..b3c80f012 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -992,12 +992,14 @@ main(int argc, char *argv[])
                     VLOG_INFO("OVNNB commit failed, "
                               "force recompute next time.");
                     eng_ctx.recompute = true;
+                    poll_immediate_wake();
                 }
 
                 if (!ovsdb_idl_loop_commit_and_wait(&ovnsb_idl_loop)) {
                     VLOG_INFO("OVNSB commit failed, "
                               "force recompute next time.");
                     eng_ctx.recompute = true;
+                    poll_immediate_wake();
                 }
                 run_memory_trimmer(ovnnb_idl_loop.idl, activity);
             } else {
-- 
2.46.0

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

Reply via email to