ovs-interface: dissociate the link on deleting it from ovsdb

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.

https://bugzilla.redhat.com/show_bug.cgi?id=1543557
This commit is contained in:
Lubomir Rintel
2019-03-12 15:50:47 +01:00
parent b634c5434d
commit c5539c2931

View File

@@ -20,6 +20,7 @@
#include "nm-default.h"
#include "nm-device-ovs-port.h"
#include "nm-device-ovs-interface.h"
#include "nm-ovsdb.h"
#include "devices/nm-device-private.h"
@@ -141,6 +142,11 @@ release_slave (NMDevice *device, NMDevice *slave, gboolean configure)
{
nm_ovsdb_del_interface (nm_ovsdb_get (), nm_device_get_iface (slave),
del_iface_cb, g_object_ref (slave));
/* Open VSwitch is going to delete this one. We must ignore what happens
* next with the interface. */
if (NM_IS_DEVICE_OVS_INTERFACE (slave))
nm_device_update_from_platform_link (slave, NULL);
}
/*****************************************************************************/