Bug 2070184 - Hybrid Backup - Specifying disks for backup doesn't work, backup is created for all disks
Summary: Hybrid Backup - Specifying disks for backup doesn't work, backup is created f...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.5.0
: 4.5.0.3
Assignee: Benny Zlotnik
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On: 2075435
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-30 14:55 UTC by Evelina Shames
Modified: 2022-04-28 09:26 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-4.5.0.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-28 09:26:34 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.5?
pm-rhel: blocker?
ahadas: devel_ack+


Attachments (Terms of Use)
engine+art (1.63 MB, application/zip)
2022-03-30 14:55 UTC, Evelina Shames
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 210 0 None Draft core: only use selected disks for hybrid backup 2022-03-30 15:03:10 UTC
Red Hat Issue Tracker RHV-45497 0 None None None 2022-03-30 15:01:47 UTC

Description Evelina Shames 2022-03-30 14:55:03 UTC
Created attachment 1869470 [details]
engine+art

Description of problem:
In Hybrid mode, when trying to specify disks for a backup, the backup is created for all disks and not only for the specified ones.

For example, I have a VM with a cow OS disk and another cow disk.
Trying to create a backup only for the OS disk:

url:/ovirt-engine/api/vms/6dbf3334-ef27-40ad-a40c-f845bc940bf6/backups?require_consistency=True body:<backup>
    <disks>
        <disk id="79362ea3-8513-46b7-af09-df16f2a4d8e1"/>
    </disks>
...
...
...

backup details: /ovirt-engine/api/vms/6dbf3334-ef27-40ad-a40c-f845bc940bf6/backups

<backups>
<backup href="/ovirt-engine/api/vms/6dbf3334-ef27-40ad-a40c-f845bc940bf6/backups/1d2de782-4054-4ea4-9a7a-a3d0d5f3430e" id="1d2de782-4054-4ea4-9a7a-a3d0d5f3430e">
<actions>
<link href="/ovirt-engine/api/vms/6dbf3334-ef27-40ad-a40c-f845bc940bf6/backups/1d2de782-4054-4ea4-9a7a-a3d0d5f3430e/finalize" rel="finalize"/>
</actions>
<link href="/ovirt-engine/api/vms/6dbf3334-ef27-40ad-a40c-f845bc940bf6/backups/1d2de782-4054-4ea4-9a7a-a3d0d5f3430e/disks" rel="disks"/>
<creation_date>2022-03-30T17:14:55.677+03:00</creation_date>
<modification_date>2022-03-30T17:14:55.685+03:00</modification_date>
<phase>starting</phase>
<vm href="/ovirt-engine/api/vms/6dbf3334-ef27-40ad-a40c-f845bc940bf6" id="6dbf3334-ef27-40ad-a40c-f845bc940bf6"/>
</backup>
</backups>

backup disks: /ovirt-engine/api/vms/6dbf3334-ef27-40ad-a40c-f845bc940bf6/backups/1d2de782-4054-4ea4-9a7a-a3d0d5f3430e/disks

<disks>
<disk id="d509c4b3-2238-4ec1-9368-ebbc020b2bbd">
<name>disk_TestCase27566_3017093201</name>
<description/>
<actual_size>1073741824</actual_size>
<alias>disk_TestCase27566_3017093201</alias>
<backup>none</backup>
<backup_mode>full</backup_mode>
<content_type>data</content_type>
<format>cow</format>
<image_id>bf224f2c-e6a7-4a6f-9e98-4894f08c0711</image_id>
<propagate_errors>false</propagate_errors>
<provisioned_size>1073741824</provisioned_size>
<qcow_version>qcow2_v3</qcow_version>
<shareable>false</shareable>
<sparse>true</sparse>
<status>ok</status>
<storage_type>image</storage_type>
<total_size>0</total_size>
<wipe_after_delete>false</wipe_after_delete>
<disk_profile id="8026154b-9b8c-40c6-92f0-cbb98edb64e9"/>
<quota id="c977b7bc-1456-4531-86c5-b22e79e91578">
<data_center id="a7b433b8-aaf3-424a-9ede-f4c37f9b4120"/>
</quota>
<storage_domains>
<storage_domain id="dc0b82d1-f5ce-48d3-9bf3-301abbf2b3f1"/>
</storage_domains>
</disk>
<disk id="79362ea3-8513-46b7-af09-df16f2a4d8e1">
<name>vm_TestCase27566_3017080867_Disk_0</name>
<description>latest-rhel-guest-image-8.6-infra (99dc226)</description>
<actual_size>1073741824</actual_size>
<alias>vm_TestCase27566_3017080867_Disk_0</alias>
<backup>none</backup>
<backup_mode>full</backup_mode>
<content_type>data</content_type>
<format>cow</format>
<image_id>fb9c2ffa-bfc9-4143-9bd8-dcbca549fca0</image_id>
<propagate_errors>false</propagate_errors>
<provisioned_size>10737418240</provisioned_size>
<qcow_version>qcow2_v3</qcow_version>
<shareable>false</shareable>
<sparse>true</sparse>
<status>ok</status>
<storage_type>image</storage_type>
<total_size>0</total_size>
<wipe_after_delete>false</wipe_after_delete>
<disk_profile id="8026154b-9b8c-40c6-92f0-cbb98edb64e9"/>
<quota id="c977b7bc-1456-4531-86c5-b22e79e91578">
<data_center id="a7b433b8-aaf3-424a-9ede-f4c37f9b4120"/>
</quota>
<storage_domains>
<storage_domain id="dc0b82d1-f5ce-48d3-9bf3-301abbf2b3f1"/>
</storage_domains>
</disk>
</disks>


The Auto-generated snapshot for Backup VM includes both disks, while it should include only the specified disk.


Version-Release number of selected component (if applicable):
engine-4.5.0-0.237.el8ev


How reproducible:
always

Steps to Reproduce:
1. Create a VM with a cow OS disk
2. Attach another cow disk
3. Try to create a full backup only for the OS disk

Actual results:
Backup is created for all disks
(Snapshot includes all disks)

Expected results:
Backup should include only one disk - the OS disk

Additional info:
Logs are attached

Comment 1 RHEL Program Management 2022-03-30 14:59:42 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Evelina Shames 2022-04-13 14:39:05 UTC
While testing this fix, I noticed that the hfers changed:

<backups>
<backup href="/ovirt-engine/api/vms/05f2931e-65da-421a-a31d-0cd12fe7415f/snapshots/1adf1366-18db-4ed4-af62-850ccbf03472/null/43d626dd-8dcd-422d-aec5-a88b6364edf2" id="43d626dd-8dcd-422d-aec5-a88b6364edf2">
<actions>
<link href="/ovirt-engine/api/vms/05f2931e-65da-421a-a31d-0cd12fe7415f/snapshots/1adf1366-18db-4ed4-af62-850ccbf03472/null/43d626dd-8dcd-422d-aec5-a88b6364edf2/finalize" rel="finalize"/>
</actions>
<link href="/ovirt-engine/api/vms/05f2931e-65da-421a-a31d-0cd12fe7415f/snapshots/1adf1366-18db-4ed4-af62-850ccbf03472/null/43d626dd-8dcd-422d-aec5-a88b6364edf2/disks" rel="disks"/>
<creation_date>2022-04-13T17:23:44.084+03:00</creation_date>
<modification_date>2022-04-13T17:23:53.900+03:00</modification_date>
<phase>ready</phase>
<to_checkpoint_id>148232f7-cb16-4afb-9efb-60b0d762d844</to_checkpoint_id>
<snapshot href="/ovirt-engine/api/vms/05f2931e-65da-421a-a31d-0cd12fe7415f/snapshots/1adf1366-18db-4ed4-af62-850ccbf03472" id="1adf1366-18db-4ed4-af62-850ccbf03472"/>
<vm href="/ovirt-engine/api/vms/05f2931e-65da-421a-a31d-0cd12fe7415f" id="05f2931e-65da-421a-a31d-0cd12fe7415f"/>
</backup>
</backups>

the new href leads to nothing, while it should be:
/ovirt-engine/api/vms/05f2931e-65da-421a-a31d-0cd12fe7415f/backups/43d626dd-8dcd-422d-aec5-a88b6364edf2/disks
and this path gives the desired info

and it looks like the backup is stuck on finalizing, I get this warning in engine.log:
2022-04-13 17:35:38,823+03 WARN  [org.ovirt.engine.api.restapi.util.LinkHelper] (default task-1) [] Can't find relative path for class "org.ovirt.engine.api.resource.VmBackupsResource", will return null

Comment 3 RHEL Program Management 2022-04-13 14:39:13 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 7 Evelina Shames 2022-04-25 12:44:08 UTC
Verified on ovirt-engine-4.5.0.4-0.1.el8ev.

only the right disk is included in the backup:
/ovirt-engine/api/vms/64e8117b-dbea-4a28-876d-50504954591e/backups/fa6d8d02-1918-4c5d-b875-bc3af6e2478c/disks
<disks>
  <disk id="6c633d8a-3fce-47f2-9f49-bd9a7d86b963">
    ...
    ...
    ...
  </disk>
</disks>

Moving to 'Verified'.

Comment 8 Sandro Bonazzola 2022-04-28 09:26:34 UTC
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022.

Since the problem described in this bug report should be resolved in oVirt 4.5.0 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.


Note You need to log in before you can comment on or make changes to this bug.