Bug 1858622 - Volume metadata is not copied from source volume
Summary: Volume metadata is not copied from source volume
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.4.1-1
: ---
Assignee: Benny Zlotnik
QA Contact: Shir Fishbain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-19 15:51 UTC by Benny Zlotnik
Modified: 2020-08-05 06:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-05 06:28:18 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.4+
aoconnor: blocker+


Attachments (Terms of Use)
screenshot (114.63 KB, image/png)
2020-07-25 22:50 UTC, Shir Fishbain
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 110369 0 master MERGED core: update volume metdata after copy 2021-02-07 14:12:39 UTC
oVirt gerrit 110371 0 ovirt-engine-4.4.1.z MERGED core: update volume metdata after copy 2021-02-07 14:12:39 UTC

Description Benny Zlotnik 2020-07-19 15:51:06 UTC
Description of problem:
When performing operations that use SDM.copy_data (copy template, move/copy disk) the target disk does not have the original metadata. This happens because SDM.copy_data does not handle creation and updating like copyImage used to, now engine has to handle it.

For example, a copied template disk will have a LEAF volume type instead of SHARED, and the description will always be empty

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


How reproducible:
100%

Steps to Reproduce:
1. Copy template's disk

Actual results:
Original volume:
$ vdsm-client StorageDomain dump sd_id=84d6d137-49c2-4b02-86eb-ef31a126abd9 | jq '.volumes | .[] | select(.image=="9280f5cb-1154-4ac5-a065-4c55a32126a8")'
{
  "apparentsize": 1073741824,
  "capacity": 1073741824,
  "ctime": 1595159063,
  "description": "{\"DiskAlias\":\"ka_Disk1\",\"DiskDescription\":\"\"}",
  "disktype": "DATA",
  "format": "RAW",
  "generation": 0,
  "image": "9280f5cb-1154-4ac5-a065-4c55a32126a8",
  "legality": "LEGAL",
  "parent": "00000000-0000-0000-0000-000000000000",
  "status": "OK",
  "truesize": 4096,
  "type": "SPARSE",
  "voltype": "SHARED"
}

Target volume:
$ vdsm-client StorageDomain dump sd_id=1d8cd36e-0fc6-4c67-a737-3ca9dd81176b | jq '.volumes | .[] | select(.image=="9280f5cb-1154-4ac5-a065-4c55a32126a8")'
{
  "apparentsize": 1073741824,
  "capacity": 1073741824,
  "ctime": 1595164276,
  "description": "None", <---- missing description
  "disktype": "DATA",
  "format": "RAW",
  "generation": 0,
  "image": "9280f5cb-1154-4ac5-a065-4c55a32126a8",
  "legality": "LEGAL",
  "parent": "00000000-0000-0000-0000-000000000000",
  "status": "OK",
  "truesize": 4096,
  "type": "SPARSE",
  "voltype": "LEAF" <---- incorrect
}

Expected results:

Target volume:
$ vdsm-client StorageDomain dump sd_id=84d6d137-49c2-4b02-86eb-ef31a126abd9 | jq '.volumes | .[] | select(.image=="9280f5cb-1154-4ac5-a065-4c55a32126a8")'
{
  "apparentsize": 1073741824,
  "capacity": 1073741824,
  "ctime": 1595159063,
  "description": "{\"DiskAlias\":\"ka_Disk1\",\"DiskDescription\":\"\"}",
  "disktype": "DATA",
  "format": "RAW",
  "generation": 0,
  "image": "9280f5cb-1154-4ac5-a065-4c55a32126a8",
  "legality": "LEGAL",
  "parent": "00000000-0000-0000-0000-000000000000",
  "status": "OK",
  "truesize": 4096,
  "type": "SPARSE",
  "voltype": "SHARED"
}

Additional info:

Comment 1 Benny Zlotnik 2020-07-20 12:44:25 UTC
Note: The description will be handled separately in bug 1841183

Comment 2 Shir Fishbain 2020-07-25 22:48:40 UTC
Almost verified, the copied template disk has a LEAF volume but the description is still missing (look at the screenshot- there is a description )

The volume of the template disk before "copy disk" operation:
# vdsm-client StorageDomain dump sd_id=bcdfdd99-eb20-4cd6-a787-e8002ba95d86
 "volumes": {
        "5148c988-2ed1-4894-a0dc-a5be4bc66736": {
            "apparentsize": 10737418240,
            "capacity": 10737418240,
            "ctime": 1595716300,
            "description": "None",------> missing the description that appears in the screenshot attached 
            "disktype": "DATA",
            "format": "RAW",
            "generation": 1,
            "image": "ee0df603-caf4-4db6-8ef7-703af46015e4",
            "legality": "LEGAL",
            "mdslot": 4,
            "parent": "00000000-0000-0000-0000-000000000000",
            "status": "OK",
            "truesize": 10737418240,
            "type": "PREALLOCATED",
            "voltype": "LEAF"
        },
The same volume just after copy disk operation:
    "volumes": {
        "5148c988-2ed1-4894-a0dc-a5be4bc66736": {
            "apparentsize": 10737418240,
            "capacity": 10737418240,
            "ctime": 1595716300,
            "description": "None",-------> still missing the description after copy template disk operation
            "disktype": "DATA",
            "format": "RAW",
            "generation": 1,
            "image": "ee0df603-caf4-4db6-8ef7-703af46015e4",
            "legality": "LEGAL",
            "mdslot": 4,
            "parent": "00000000-0000-0000-0000-000000000000",
            "status": "OK",
            "truesize": 10737418240,
            "type": "PREALLOCATED",
            "voltype": "LEAF"
        },

The volume of the copy disk:

        "e15dfda6-4c25-48ec-848a-5ff923c56309": {
            "apparentsize": 10737418240,
            "capacity": 10737418240,
            "ctime": 1595716483,
            "description": "None",
            "disktype": "DATA",
            "format": "RAW",
            "generation": 1,
            "image": "2d089bec-ba4c-4f6a-872f-dbdd072250a4",
            "legality": "LEGAL",
            "mdslot": 5,
            "parent": "00000000-0000-0000-0000-000000000000",
            "status": "OK",
            "truesize": 10737418240,
            "type": "PREALLOCATED",
            "voltype": "LEAF"
        },


Benny, tell me if you need an environment to look at this issue.

Comment 3 Shir Fishbain 2020-07-25 22:50:31 UTC
Created attachment 1702416 [details]
screenshot

Comment 4 Eyal Shenitzky 2020-07-26 04:59:37 UTC
The missing description fix is part of a different bug 1841183.

The fix for this bug include only the "voltype".

Comment 5 Shir Fishbain 2020-07-26 06:57:59 UTC
Verified

The description will be verified on https://bugzilla.redhat.com/show_bug.cgi?id=1841183

Versions:
vdsm-4.40.22-1.el8ev.x86_64
ovirt-engine-4.4.1.10-0.1.el8ev.noarch

Comment 6 Shir Fishbain 2020-07-26 09:31:12 UTC
After talked with Benny and understood the verification scenario flow, this is the right verification for this bug:

Verified

Before copy disk:
# vdsm-client StorageDomain dump sd_id=85c54e79-7ad9-4750-9a67-faba395ca3d3
        "c1291088-42f4-4205-aacd-d6152fbea422": {
            "apparentsize": 4294967296,
            "capacity": 4294967296,
            "ctime": 1595513636,
            "description": "{\"DiskAlias\":\"shir_verification_vm_Disk1\",\"DiskDescription\":\"\"}",
            "disktype": "DATA",
            "format": "RAW",
            "generation": 0,
            "image": "4a48b8bb-b3e5-4401-84b7-3f6148d8cc4b",
            "legality": "LEGAL",
            "parent": "00000000-0000-0000-0000-000000000000",
            "status": "OK",
            "truesize": 4222976,
            "type": "SPARSE",
            "voltype": "SHARED"
        },

After copy disk:
        "c1291088-42f4-4205-aacd-d6152fbea422": {
            "apparentsize": 4294967296,
            "capacity": 4294967296,
            "ctime": 1595755284,
            "description": "None",
            "disktype": "DATA",
            "format": "RAW",
            "generation": 2,
            "image": "4a48b8bb-b3e5-4401-84b7-3f6148d8cc4b",
            "legality": "LEGAL",
            "parent": "00000000-0000-0000-0000-000000000000",
            "status": "OK",
            "truesize": 4222976,
            "type": "SPARSE",
            "voltype": "SHARED"
        },

Comment 7 Sandro Bonazzola 2020-08-05 06:28:18 UTC
This bugzilla is included in oVirt 4.4.1.1 Async release, published on July 13th 2020.

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


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