From b43503b67b8ffc731511cc08dc422b42e3bef2c6 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 18 Jul 2022 10:00:49 +0200 Subject: [PATCH] ovs: fail device only when it's activating It doesn't make sense to fail a device that is not activating. Especially, if the device was in state UNMANAGED, it would enter state FAILED (and then DISCONNECTED) or ACTIVATED (when external or assumed); both are wrong. https://bugzilla.redhat.com/show_bug.cgi?id=2077950 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1302 (cherry picked from commit 93372e81001baa2278cee1c83115b55f077033a6) (cherry picked from commit 562239779c0058114a08c6da1a6c0ae3c77f02d4) --- src/core/devices/ovs/nm-ovs-factory.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/devices/ovs/nm-ovs-factory.c b/src/core/devices/ovs/nm-ovs-factory.c index 3ff0abf878..5aaa5c0179 100644 --- a/src/core/devices/ovs/nm-ovs-factory.c +++ b/src/core/devices/ovs/nm-ovs-factory.c @@ -244,7 +244,11 @@ ovsdb_interface_failed(NMOvsdb *ovsdb, TRUE); } - nm_device_state_changed(device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_OVSDB_FAILED); + if (nm_device_is_activating(device)) { + nm_device_state_changed(device, + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_OVSDB_FAILED); + } } static void