From 19613a8d81f9bfccb7450229157e416bd1a27e0f Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Wed, 25 May 2022 10:07:40 +0200 Subject: [PATCH] ovsdb: do not set the device as DEACTIVATING if it is DISCONNECTED During the deactivation of ovs interfaces, ovsdb receives the command to remove the interface but for OVS system ports the device won't disappear. When reconnecting, ovsdb will update first the status and it will notice that the OVS system interface was removed and it will set the status as DEACTIVATING. This is incorrect if the status is already DEACTIVATING, DISCONNECTED, UNMANAGED or UNAVAILABLE because it will block the activation of the interface. https://bugzilla.redhat.com/show_bug.cgi?id=2080236 (cherry picked from commit bc6e28e5852395f1b53cd0782bae2c6c705079a3) --- src/core/devices/ovs/nm-ovs-factory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/devices/ovs/nm-ovs-factory.c b/src/core/devices/ovs/nm-ovs-factory.c index 5aaa5c0179..ff2c785859 100644 --- a/src/core/devices/ovs/nm-ovs-factory.c +++ b/src/core/devices/ovs/nm-ovs-factory.c @@ -178,7 +178,8 @@ ovsdb_device_removed(NMOvsdb *ovsdb, device_state = nm_device_get_state(device); if (device_type == NM_DEVICE_TYPE_OVS_INTERFACE && nm_device_get_act_request(device) - && device_state < NM_DEVICE_STATE_DEACTIVATING) { + && (device_state > NM_DEVICE_STATE_DISCONNECTED + && device_state < NM_DEVICE_STATE_DEACTIVATING)) { nm_device_state_changed(device, NM_DEVICE_STATE_DEACTIVATING, NM_DEVICE_STATE_REASON_REMOVED);