Skip to content

Commit 2ee1d35

Browse files
committed
feat: add snapshot_lvm_revertable parameter to module interface
Add the snapshot_lvm_revertable parameter to the snapshot module, allowing users to create revert boot entries for snapshot sets. This parameter is supported at both the global level and within snapshot_lvm_set definitions. A revert boot entry allows booting into a special mode that automatically merges the snapshot back into the origin volume, providing a boot-time rollback mechanism for disaster recovery. Signed-off-by: Todd Gill <tgill@redhat.com>
1 parent 20514dd commit 2ee1d35

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

library/snapshot.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@
100100
When set to true, and passed to the 'snapshot' command, the snapshot created will have
101101
a corresponding boot entry. The boot entry will be removed when the snapset is removed.
102102
type: bool
103+
snapshot_lvm_revertable:
104+
description: Only supported on operating systems that support snapshot manager (snapm).
105+
When set to true, and passed to the 'snapshot' command, the snapshot created will have
106+
a corresponding revert boot entry. Booting into the revert entry will trigger an automatic
107+
revert operation, merging the snapshot back into the origin volume. The revert boot entry
108+
will be removed when the snapset is removed.
109+
type: bool
103110
snapshot_lvm_set:
104111
description: set of volumes
105112
type: dict
@@ -110,6 +117,9 @@
110117
bootable:
111118
description: create snapshot with boot menu entry (requires snapm)
112119
type: bool
120+
revertable:
121+
description: create snapshot with revert boot menu entry (requires snapm)
122+
type: bool
113123
volumes:
114124
description: list of volumes
115125
type: list
@@ -291,6 +301,7 @@ def run_module():
291301
snapshot_lvm_verify_only=dict(type="bool"),
292302
snapshot_lvm_mount_origin=dict(type="bool"),
293303
snapshot_lvm_bootable=dict(type="bool"),
304+
snapshot_lvm_revertable=dict(type="bool"),
294305
snapshot_lvm_mountpoint_create=dict(type="bool"),
295306
snapshot_lvm_unmount_all=dict(type="bool"),
296307
snapshot_lvm_percent_space_required=dict(type="str"),
@@ -306,6 +317,7 @@ def run_module():
306317
options=dict(
307318
name=dict(type="str"),
308319
bootable=dict(type="bool"),
320+
revertable=dict(type="bool"),
309321
volumes=dict(
310322
type="list",
311323
elements="dict",

0 commit comments

Comments
 (0)