On 8/20/26 3:51 PM, Aaron Conole via dev wrote:
> A recent change made the ovsdb-server socket available as a gating object
> preventing race conditions leading to cascading failure states when the
> DB service experienced a failure.  As part of that change, all of the
> service dependencies were shifted to using the socket file as the gate.
> 
> Unfortunately, this exposed a few problems on Fedora 44 shipped systemd.
> Specifically, with systemd 259.8 the services are now starting in parallel,
> but that leads to a few unexpected side effects:
> 
> 1. The ovs-ctl calls 'ovs-vsctl' directly, which requires both a DB service
>    and the vswitchd service to acknowledge the transaction, leading to a
>    hang.
> 
> 2. The ovs-delete-transient-ports service not waiting for the ovsdb service
>    to fully initialize (when running vsctl with --no-wait), so erroring
>    before completing the transient port deletion.

I'm a bit confused.  Why does it error out if the socket service is up?
If the socket service is "started" then the socket must exist, right?
And then connection to it must block until the ovsdb-server is actually
running and accepting connections.  Why does it error?

> 
> Since the service is meant to run on boot, only once (given the Type and
> RemainAfterExit values) it makes more sense to keep the gate on the server
> service, and switch 'ovs-ctl' to use the builtin ovs_vsctl function to
> be a 'db only' transaction.
> 
> Fixes: 7e7f5d26f841 ("rhel: Add ovsdb-server.socket unit for systemd socket 
> activation.")
> Signed-off-by: Aaron Conole <[email protected]>
> ---
> 
> v1->v2: Bad squash commit (fat-fingered the squash)
> v2->v3: Corrected the squash.
> 
>  rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service | 2 +-
>  utilities/ovs-ctl.in                                           | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service 
> b/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service
> index 5f993e3047..c06fb19d5d 100644
> --- a/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service
> +++ b/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service
> @@ -1,6 +1,6 @@
>  [Unit]
>  Description=Open vSwitch Delete Transient Ports
> -After=ovsdb-server.socket
> +After=ovsdb-server.service
>  Before=ovs-vswitchd.service
>  
>  [Service]
> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> index 8ebd720dc5..cfa1ac0625 100644
> --- a/utilities/ovs-ctl.in
> +++ b/utilities/ovs-ctl.in
> @@ -115,7 +115,7 @@ check_core_config () {
>  }
>  
>  del_transient_ports () {
> -    for port in `ovs-vsctl --bare -- --columns=name find port 
> other_config:transient=true`; do
> +    for port in `ovs_vsctl --no-wait --bare -- --columns=name find port 
> other_config:transient=true`; do

ovs_vsctl already includes the --no-wait.

>          ovs_vsctl -- del-port "$port"
>      done
>  }

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

Reply via email to