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: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.3.5.4
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ovirt-4.4.0
: ---
Assignee: Ahmad Khiet
QA Contact: Ilan Zuckerman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-30 13:40 UTC by Yosi Ben Shimon
Modified: 2020-05-20 19:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 19:57:44 UTC
oVirt Team: Storage
Embargoed:
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 Private Priority Status Summary Last Updated
oVirt gerrit 105738 0 master MERGED engine: duplicate disk entries after vm import 2020-04-07 09:54:29 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

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

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

Comment 13 Ilan Zuckerman 2020-03-10 07:47:38 UTC
I verified this BZ following those steps:

1. Create a VM with a preallocated disk on iscsi domain. Not from template. Without OS.
2. Take snapshot (VM down)
3. Export the VM to export domain
4. Import the VM with a new name using the same iscsi domain. This is done twice since i wasnt sure which disk format should be used for this (thin / preallocated)

Actual results:
Both,The original and imported VM DO NOT have extra disk. Only one (original disk)
I also verified this using API and looking at diskattachments per each VM (ORIGINAL and imported).

Comment 14 Ilan Zuckerman 2020-03-10 07:50:29 UTC
Ahmed, since i am not the reporter of the BZ and my familiarity with this BZ is from reading it only, please see my verification steps and consider them as a verification or not. So i could change the status of this bz to 'verified.'

Comment 15 Ahmad Khiet 2020-03-10 10:20:37 UTC
Hi Ilan,
the steps in comment #13 are correct! but can be done once
or see the first comment as Yossi mentioned.

the expected result is after importing the VM, you will see one disk for the VM, not two disks

Comment 16 Sandro Bonazzola 2020-05-20 19:57:44 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

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