From 93372e81001baa2278cee1c83115b55f077033a6 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 --- 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 636dfeee14..ff2c785859 100644 --- a/src/core/devices/ovs/nm-ovs-factory.c +++ b/src/core/devices/ovs/nm-ovs-factory.c @@ -245,7 +245,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