Bug 1734409 - Duplicate image id when importing VM from export domain while the original VM still exists in the environment
Summary: Duplicate image id when importing VM from export domain while the original VM...
Keywords:
Status: MODIFIED
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.3.5.4
Hardware: x86_64
OS: Unspecified
high
high vote
Target Milestone: ovirt-4.4.0
: ---
Assignee: Ahmad Khiet
QA Contact: Yosi Ben Shimon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-30 13:40 UTC by Yosi Ben Shimon
Modified: 2020-01-24 19:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-23 13:33:58 UTC
oVirt Team: Storage
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)
export_import_vm (12.68 MB, image/gif)
2019-08-14 15:08 UTC, Yosi Ben Shimon
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 105738 master MERGED engine: duplicate disk entries after vm import 2020-02-19 14:57:07 UTC

Description Yosi Ben Shimon 2019-07-30 13:40:42 UTC
Description of problem:
When import VM (that was exported) from export domain, the new VM is being created but the original VM has another disk with the same id as the original one.
The first disk (that was created with the VM) is preallocated on iscsi domain.
The second disk (that was added during the import VM) is thin provisioned on the same iscsi domain.

Version-Release number of selected component (if applicable):
ovirt-engine-4.3.5.4-0.1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Create a VM with a preallocated disk on iscsi domain
2. Take snapshot
3. Export the VM to export domain
4. Import the VM with a new name using the same iscsi domain

Actual results:
The original VM has extra disk with the same id as the original one

Expected results:
Even though the VM has the extra disk, it shouldn't be with the same id

Additional info:

Comment 1 Tal Nisan 2019-08-12 14:43:46 UTC
Did you choose the "Import as Clone" option?

Comment 2 Yosi Ben Shimon 2019-08-14 14:25:28 UTC
(In reply to Tal Nisan from comment #1)
> Did you choose the "Import as Clone" option?

The "clone" checkbox is checked and disabled. So yes.

Comment 3 Yosi Ben Shimon 2019-08-14 15:08:19 UTC
Created attachment 1603791 [details]
export_import_vm

See attached capture

Comment 4 Avihai 2019-09-15 08:16:08 UTC
This issue is regression, occurred first in 4.3.5 and it really looks bad(another disk is added to original VM with thin provision).
This is 100% reproducible manually.

Raising to high priority, consider fixing in 4.3.7.

Comment 5 Tal Nisan 2019-09-23 13:33:58 UTC
Export domain will be removed in 4.4, no need to fix this

Comment 6 Benny Zlotnik 2019-09-23 16:05:05 UTC
(In reply to Avihai from comment #4)
> This issue is regression, occurred first in 4.3.5 and it really looks
> bad(another disk is added to original VM with thin provision).
> This is 100% reproducible manually.
> 
> Raising to high priority, consider fixing in 4.3.7.

Note, this is not another disk, it's the snapshot just the snapshot image, because its "active" column is has been changed to true for some reason.
This can be worked around by changing it back to "false".

Comment 7 Avihai 2019-11-26 15:34:37 UTC
(In reply to Tal Nisan from comment #5)
> Export domain will be removed in 4.4, no need to fix this

Reopening as we now realize that export domain is here to stay in 4.4.

Also this is a clear regression(since 4.3.5), how much effort will it take to fix this bug?

(In reply to Benny Zlotnik from comment #6)

> Note, this is not another disk, it's the snapshot just the snapshot image,
> because its "active" column is has been changed to true for some reason.
> This can be worked around by changing it back to "false".

The user sees the original VM has extra disk with the same id as the original one -> this looks bad.
Can you please add the suggested work around in the code and fix this issue?

Original scenario
1. Create a VM with a preallocated disk on iscsi domain
2. Take snapshot
3. Export the VM to export domain
4. Import the VM with a new name using the same iscsi domain

Actual results:
The original VM has extra disk with the same id as the original one

Comment 8 Lukas Svaty 2019-11-29 12:26:00 UTC
13:23:22 < vjuranek> lsvaty|gchat: jmacku lleistne I just went (by accident) over this isseu: https://bugzilla.redhat.com/show_bug.cgi?id=1734409 ... may be related to the issue we discussed in the morning (maybe even exactly the issue)

that would mean it is blocking currently 4.4 QE full Automation (adding keyword)

Adding info as it is worth considering

Comment 9 Ahmad Khiet 2019-12-02 15:22:43 UTC
tried with REST api, after exporting the vm, the endpoint returns one disk. 
but in UI I see there are two disks.

Comment 10 RHV Bug Bot 2020-01-08 14:48:09 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.4.0' doesn't contain patch 'https://gerrit.ovirt.org/105738']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.4.0

For more info please contact: infra@ovirt.org

Comment 11 RHV Bug Bot 2020-01-08 15:13:57 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.4.0' doesn't contain patch 'https://gerrit.ovirt.org/105738']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.4.0

For more info please contact: infra@ovirt.org

Comment 12 RHV Bug Bot 2020-01-24 19:49:54 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.4.0' doesn't contain patch 'https://gerrit.ovirt.org/105738']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.4.0

For more info please contact: infra@ovirt.org


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