Timothy Redaelli <[email protected]> writes:

> On Wed, 19 Aug 2026 09:42:53 -0400
> Aaron Conole <[email protected]> wrote:
>
>> 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.
>
> Makes sense, the cleanup is a DB-only operation and shouldn't depend on
> vswitchd being up.
>
>> 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
>>  }
>
> ovs_vsctl() already passes --no-wait (utilities/ovs-lib.in), so the
> del-port line ends up with it twice.  You should just replace the
> ovs-vsctl inside the for with ovs_vsctl, like:

ACK - makes sense to me.

>  del_transient_ports () {
> -    for port in `ovs-vsctl --bare -- --columns=name find port
>  other_config:transient=true`; do
> +    for port in `ovs_vsctl --bare -- --columns=name find port
>  other_config:transient=true`; do ovs_vsctl -- del-port "$port"
>      done
>  }

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

Reply via email to