From ee39f3ab79b3f615285ffbe2cece66ad1205d96a Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 12 Mar 2019 15:50:47 +0100 Subject: [PATCH] ovs-port: dissociate the link from the interface device on delete Open vSwitch is the special kid on the block -- it likes to be in charge of the link lifetime and so we shouldn't be. This means that we shouldn't be attempting to remove the link: we'd just (gracefully) fail anyways. More importantly, this also means that we shouldn't care if we see the link go away. We may already be activating another connection and shouldn't alter the device state when OpenVSwitch decides to drop the old link. https://bugzilla.redhat.com/show_bug.cgi?id=1543557 https://github.com/NetworkManager/NetworkManager/pull/315 --- src/devices/ovs/nm-device-ovs-port.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/devices/ovs/nm-device-ovs-port.c b/src/devices/ovs/nm-device-ovs-port.c index b96eba686a..bc1eb677bd 100644 --- a/src/devices/ovs/nm-device-ovs-port.c +++ b/src/devices/ovs/nm-device-ovs-port.c @@ -139,6 +139,13 @@ del_iface_cb (GError *error, gpointer user_data) static void release_slave (NMDevice *device, NMDevice *slave, gboolean configure) { + /* Dissociate the platform link from the device -- openvswitch is going + * to remove the link, not us. We shouldn't care about whatever happen to it. + * In particular, we don't want to alter the NMDevice state if we see the + * link go away, because the device may already have another activation + * enqueued. */ + nm_device_update_from_platform_link (slave, NULL); + nm_ovsdb_del_interface (nm_ovsdb_get (), nm_device_get_iface (slave), del_iface_cb, g_object_ref (slave)); }