Bug 1813831
| Summary: | [RFE][CBT] Allow to view and remove VM backup checkpoints | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Eyal Shenitzky <eshenitz> |
| Component: | BLL.Storage | Assignee: | Eyal Shenitzky <eshenitz> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ilan Zuckerman <izuckerm> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.4.0 | CC: | aefrat, bugs, eshames, pelauter, sshmulev, tnisan |
| Target Milestone: | ovirt-4.4.1 | Keywords: | FutureFeature |
| Target Release: | --- | Flags: | pm-rhel:
ovirt-4.4+
izuckerm: testing_plan_complete+ pelauter: planning_ack+ pm-rhel: devel_ack+ aefrat: testing_ack+ |
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
This enhancement enables you to remove incremental backup root checkpoints.
Backing up a virtual machine (VM) creates a checkpoint in libvirt and the RHV Manager's database. In large scale environments, these backups can produce a high number of checkpoints. When you restart virtual machines, the Manager redefines their checkpoints on the host; if there are many checkpoints, this operation can degrade performance. The checkpoints' XML descriptions also consume a lot of storage.
This enhancement provides the following operations:
* View all the VM checkpoints using the new checkpoints service under the VM service -
`GET path-to-engine/api/vms/vm-uuid/checkpoints`
* View a specific checkpoint -
`GET path-to-engine/api/vms/vm-uuid/checkpoints/checkpoint-uuid`
* Remove the oldest (root) checkpoint from the chain -
`DELETE path-to-engine/api/vms/vm-uuid/checkpoints/checkpoint-uuid`
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-08-05 06:24:42 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
2020-03-16 09:07:32 UTC
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. |