Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionBeniamino Galvani
2017-09-28 09:15:50 UTC
Checkpoint/rollback is only available through the D-Bus API, which makes it difficult to use for shell scripting.
Add support for this functionality to nmcli, for example with the following syntax:
$ nmcli general checkpoint create [ifname <name>] [ifname <name>] [flags <f>] [timeout <t>]
/org/freedesktop/NetworkManager/Checkpoint/0
$ nmcli general checkpoint rollback {all | <path>}
$ nmcli general checkpoint destroy <path>
Comment 3Beniamino Galvani
2017-11-08 08:11:17 UTC
Added checkpoint support to libnm in branch bg/libnm-checkpoint-rh1496739.
If needed, nmcli support can be added later, but at the moment it does not seem necessary as the checkpoint functionality is likely to be used programmatically rather than from command line. In the branch there is a short python example that can be used to manage checkpoints from command line.
> core: turn NMCheckpointManager into a GObject
I am not convinced about GObject. GObject make sense for stuff we export on D-Bus (because our D-Bus glue is GObject based).
Otherwise, it's often overkill: more lines of code, slower, and provides for flexibility/use-cases that are never used.
Note how NMManager is really strongly related to NMCheckpointManager. The point is not to have both types used independently (there is no need for that). The raison d'etre of NMCheckpointManager is to move a portion of the code out of nm-manager.c.
Yes, NMManager and NMCheckpointManager are tightly coupled, but is that wrong? Their interface between each other is still small and contained.
E.g. nobody except NMManager is ever going to subscribe to "notifiy::checkpoints". If all you want is to get a notification _checkpoint_mgr_changed(), you could just as well pass a callback
priv->checkpoint_mgr = nm_checkpoint_manager_new (self,
_checkpoint_mgr_changed);
You a bit more coupled, even just do
priv->checkpoint_mgr = \
nm_checkpoint_manager_new (self,
obj_properties[PROP_CHECKPOINTS]);
and then in checkpoint-manager, do
void _notify_checkpoints(NMCheckpointManager *self) {
g_object_notify_by_pspec (_GET_MANAGER (self), self->_checkpoint_pspec);
}
> checkpoint: track checkpoints in a list
g_hash_table_iter_init (&iter, priv->checkpoints);
- while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &checkpoint)) {
- ts = nm_checkpoint_get_rollback_ts (checkpoint);
+ while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &item)) {
+ ts = nm_checkpoint_get_rollback_ts (item->checkpoint);
now, that you have a CList, let's iterate the CList instead of the GHashTable.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:3207
Checkpoint/rollback is only available through the D-Bus API, which makes it difficult to use for shell scripting. Add support for this functionality to nmcli, for example with the following syntax: $ nmcli general checkpoint create [ifname <name>] [ifname <name>] [flags <f>] [timeout <t>] /org/freedesktop/NetworkManager/Checkpoint/0 $ nmcli general checkpoint rollback {all | <path>} $ nmcli general checkpoint destroy <path>