GNOME Bugzilla – Bug 749363
[RFE] Configuration snapshots and rollbacks
Last modified: 2020-11-12 14:31:32 UTC
Upstream bug for downstream https://bugzilla.redhat.com/show_bug.cgi?id=1217288 QUOTE: [dcbw] Various consumers of NetworkManager's API (like Cockpit) have requested snapshot/checkpoint capability for NM configuration before, to enable rollback if the machine fails post configuration tests. My initial thoughts on this are: - add a org.fdo.NM.Settings.Snapshot() -> (id: s), where we take a snapshot of all connectionsand serialize those somewhere in keyfile format in a tar.gz along with some metadata about what plugin they came from (if any, no plugin means temporary connection of course). - add a Commit(id: s) method; calling this method makes the changes since the given Snapshot() permanent, and deletes the .tar.gz of the snapshot origin - add a Rollback(id: s) method that resets that configuration to the backed up copy from Snapshot() by deleting any new connections, overwriting existing ones, and adding back missing ones. - if NM gets told to quit while there's an outstanding snapshot, it should probably roll everything back. Not 100% sure about this one though, but it's the safest bet. - NM should be determining what "successful" system boot or configuration actually is; that should be up to the thing that calls Snapshot() and Rollback(). We had discussions with the libvirt guys about this and they indicated that there are many ways to determine whether the config should be rolled back, that are higher level than just "did we get an IP". Pings to certain machines, "can I talk to known etcd", that kind of thing...
See also bug 752667, which requests a way to restore your old configuration after reinstalling the system. Possibly a "sync across devices"
bugzilla.gnome.org is being shut down in favor of a GitLab instance. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).