Bug 1953468

Summary: [CBT][RFE] Allow removing non-root checkpoints from the VM
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Avihai <aefrat>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.6CC: bugs, eshames, sfishbai, sshmulev, Yury.Panchenko
Target Milestone: ovirt-4.4.7Keywords: FutureFeature, ZStream
Target Release: 4.4.7Flags: sbonazzo: ovirt-4.4?
sshmulev: testing_plan_complete+
pm-rhel: planning_ack?
pm-rhel: devel_ack+
pm-rhel: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.7 Doc Type: Enhancement
Doc Text:
Feature: Allow removing any VM checkpoint from the checkpoint chain and not just the root checkpoint Reason: Users should be able to remove any checkpoint from the VM backups checkpoints chain. Result: Any checkpoint from the VM checkpoints chain can be removed and not just the root checkpoint in the chain.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-06 07:27:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eyal Shenitzky 2021-04-26 07:38:57 UTC
Description of problem:

Currently, the user can remove using the REST-API only the root
of the checkpoints chain.
It was restricted that way because, in the previous libvirt implementation, not all the checkpoints in the chain (and their bitmaps) were active so when a non-root checkpoint removed, a merge operation took place.

Now, when all the checkpoints (and their bitmaps) are active, there is no dependency between them. So we can allow removing non-root checkpoints also.


Version-Release number of selected component (if applicable):
4.4.6

How reproducible:
100%

Steps to Reproduce:
1. Create a VM with a disk enabled for backup
2. Start the VM
3. Create full + incremental backups
4. Try to delete the incremental backup checkpoint

Actual results:
The incremental backup checkpoint cannot remove because it is not the root checkpoint

Expected results:
The incremental backup checkpoint can be removed

Additional info:

Comment 3 Ilan Zuckerman 2021-06-06 11:05:46 UTC
Verified on rhv-release-4.4.7-1-001.noarch

1. Create VM from template and start it
2. Create full backup and record checkpoint id
3. Enable incremental backup for its disk
4. Create incremental backup and record checkpoint id
5. List existing checkpoints for the VM

[root@storage-ge4-vdsm1 ~]# vdsm-client VM list_checkpoints vmID=3cb2ce4d-c755-4765-9023-7b25c46827a9
[
    "ce87ef5e-7ce4-47bf-853f-ea4defe75523",
    "d30442aa-32e7-4548-baaa-d5f3ebee9168"

6. Remove the non root checkpoint (second - d30442aa-32e7-4548-baaa-d5f3ebee9168)
See:
https://gerrit.ovirt.org/c/ovirt-engine-sdk/+/114707

[root@storage-ge4-vdsm1 ~]# python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/remove_checkpoint.py 3cb2ce4d-c755-4765-9023-7b25c46827a9 d30442aa-32e7-4548-baaa-d5f3ebee9168 -c engine
[   0.0 ] Removing VM '3cb2ce4d-c755-4765-9023-7b25c46827a9' checkpoint 'd30442aa-32e7-4548-baaa-d5f3ebee9168'
[   0.8 ] Checkpoint 'd30442aa-32e7-4548-baaa-d5f3ebee9168' removed successfully

7. List the existing checkpoints

Expected:
the second checkpoint should be removed

Actual:
The second checkpoint is removed

[root@storage-ge4-vdsm1 ~]# vdsm-client VM list_checkpoints vmID=3cb2ce4d-c755-4765-9023-7b25c46827a9
[
    "ce87ef5e-7ce4-47bf-853f-ea4defe75523"

Comment 5 Sandro Bonazzola 2021-07-06 07:27:56 UTC
This bugzilla is included in oVirt 4.4.7 release, published on July 6th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.