Since introduction, the transient-port deletion function has cleaned up
ports which are marked as only temporary.  These ports are meant to be
purged and recreated by the orchestration layer on vswitchd restart. When
doing this, it runs a synchronous DB modification waiting for the vswitchd
to acknowledge that a change has occurred.  However, vswitchd may not have
been started.

In previous systemd deployments, the vswitchd service was automatically
started as a part of the openvswitch service, and the transient port
deletion would be able to proceed because it would receive an
acknowledgement of the list and delete operations.  However, after the
recent change to systemd service to use a socket unit, the vswitchd
doesn't always automatically start.  This is observed on newer (259.8)
systemd setups, but not on older ones.

Since deleting the ports from the DB should happen irrespective of whether
vswitchd is running, it should be safe to make these --no-wait operations
instead of needing aknowledgement from the vswitchd.  The '--no-wait' flag
allows startup to proceed as normal.  Without it, on a fresh fedora 44
install, the openvswitch service hangs.

Fixes: 7e7f5d26f841 ("rhel: Add ovsdb-server.socket unit for systemd socket 
activation.")
Signed-off-by: Aaron Conole <[email protected]>
---
 utilities/ovs-ctl.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 8ebd720dc5..fe1a43a21a 100644
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -115,8 +115,8 @@ check_core_config () {
 }
 
 del_transient_ports () {
-    for port in `ovs-vsctl --bare -- --columns=name find port 
other_config:transient=true`; do
-        ovs_vsctl -- del-port "$port"
+    for port in `ovs-vsctl --no-wait --bare -- --columns=name find port 
other_config:transient=true`; do
+        ovs_vsctl --no-wait -- del-port "$port"
     done
 }
 
-- 
2.55.0

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

Reply via email to