Description of problem: For each VM backup that created a checkpoint created on Libvirt side. The engine persists all the checkpoints in his database for later use when the VM goes down or crash. Currently, the user has no way to view and delete those checkpoints only using manual operations in the database directly. We should provide an API to allow removing VM backup checkpoint in order to clean the database. Version-Release number of selected component (if applicable): 4.4-master How reproducible: 100% Steps to Reproduce: 1. Create a VM with qcow disks 2. Start a VM backup Actual results: Checkpoint created and kept in the database without a way to remove it. Expected results: The engine should provide a way to remove the checkpoint Additional info:
Eyal, please provide a clear verification scenario.
This bug is in POST state, targeted to 4.4.1 with pending patches not merged yet. At this time we are handling only blockers for 4.4.1. Please either mark this bug as blocker or move it out to >= 4.4.2
(In reply to Avihai from comment #1) > Eyal, please provide a clear verification scenario. You can find the documentation for the new 'checkpoints' API in - https://ovirt.org/develop/release-management/features/storage/incremental-backup.html Under 'Checkpoint deletion' and 'Checkpoints REST API' topics.
Also, a new script for checkpoint removal added to the SDK. The patch is available to review - https://gerrit.ovirt.org/#/c/110123/ But not merged yet.
Eyal, pls specify the name of the table where the checkpoints are stored. So i could verify with the script that they are being removed from DB properly.
(In reply to Ilan Zuckerman from comment #5) > Eyal, pls specify the name of the table where the checkpoints are stored. > So i could verify with the script that they are being removed from DB > properly. Using this new feature you can check that the checkpoint removed from - path-to-engine/api/vms/vm-uuid/checkpoints But If you want to check the DB here are the queries: select * from vm_checkpoints where checkpoint_id='checkpoint-uuid'; select * from vm_checkpoints_disks_map where checkpoint_id='checkpoint-uuid';
Verified on rhv-release-4.4.1-11-001.noarch On this release, the script is not yet integrated. So i downloaded it + helpers/common.py From: https://gerrit.ovirt.org/#/c/109309/10 And placed them to /usr/share/doc/python3-ovirt-engine-sdk4/examples/ on the host Test steps: 1. Enable incremental backup on engine: engine-config -s "IsIncrementalBackupSupported=true" --cver 4.4 && systemctl restart ovirt-engine 2. Create vm from template 3. Enable 'backup' for VMs disk 4. Full backup the disk 5. finalize the backup Expected: 6. Check records in DB table 'vm_checkpoints', there should be one record aligned with the vm. Actual: As expected. engine=# select count(*) from vm_checkpoints; -[ RECORD 1 ] count | 1 Expected: 7. Check response of the API GET call {{engine}}vms/{{myvm_id}}/checkpoints the response should have one corresponding checkpoint. Actual: As expected. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <checkpoints> <checkpoint href="/ovirt-engine/api/vms/6d1a81c9-1356-46f1-a9ea-093cd1ff1113/checkpoints/de1520e3-110c-4992-b637-6a9c029e648d" id="de1520e3-110c-4992-b637-6a9c029e648d"> <link href="/ovirt-engine/api/vms/6d1a81c9-1356-46f1-a9ea-093cd1ff1113/checkpoints/de1520e3-110c-4992-b637-6a9c029e648d/disks" rel="disks"/> <creation_date>2020-07-23T09:47:54.998+03:00</creation_date> <vm href="/ovirt-engine/api/vms/6d1a81c9-1356-46f1-a9ea-093cd1ff1113" id="6d1a81c9-1356-46f1-a9ea-093cd1ff1113"/> </checkpoint> </checkpoints> 8. Repeat steps 4-5 to create a new checkpoint 9. repeat checks 6-7. There should be two checkpoints this time, both in DB and API. All as expected. 10. Use the remove_checkpoint.py script to remove root checkpoint for that vm. [root@storage-ge5-vdsm1 ~]# python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/remove_checkpoint.py 6d1a81c9-1356-46f1-a9ea-093cd1ff1113 --engine-url https://storage-ge-05XXX --username XXX -c ca.pem [ 0.0 ] Removing root checkpoint for VM '6d1a81c9-1356-46f1-a9ea-093cd1ff1113' Password: [ 3.3 ] Looking up checkpoints 6d1a81c9-1356-46f1-a9ea-093cd1ff1113 [ 3.5 ] Removing root checkpoint 'de1520e3-110c-4992-b637-6a9c029e648d' [ 10.8 ] Root checkpoint removed successfully Expected: - root checkpoint should be removed Actual: - Root checkpoint removed, but the second checkpoint (created by second backup) remains. ============================================================================== I repeated the same steps for a blank vm as well with two disks
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.1 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.