Skip to content

ovs: clean up interfaces from ovsdb at startup

Beniamino Galvani requested to merge bg/ovs-cleanup-rh1861296 into master

During shutdown, NM always tries to remove from ovsdb all bridges, ports, interfaces that it previously added. Currently NM doesn't run the main loop during shutdown and so it's not possible to perform asynchronous operations. In particular, the NMOvsdb singleton is disposed in a destructor where it's not possible to send out all the queued deletions.

The result is that NM deletes only one OVS interface, keeping the others. This needs to be fixed, but requires a rework of the shutdown procedure that involves many parts of NM.

Even when a better shutdown procedure will be implemented, we should support an unclean shutdown caused by e.g. a kernel panic or a NM crash. In these cases, the interfaces added by NM would still linger in the ovsdb.

Delete all those interface at NM startup. If there are connections profiles for them, NM will create them again.

https://bugzilla.redhat.com/show_bug.cgi?id=1861296

Merge request reports