Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 950073

Summary: import reported as successful too early
Product: Red Hat Enterprise Virtualization Manager Reporter: Daniele <dconsoli>
Component: ovirt-engineAssignee: Liron Aravot <laravot>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: urgent    
Version: unspecifiedCC: acathrow, amureini, chetan, dyasny, hateya, iheim, italkohe, lpeer, lyarwood, pep, perobins, Rhev-m-bugs, scohen, sgrinber, sputhenp, yeylon, ykaul
Target Milestone: ---Keywords: ZStream
Target Release: 3.2.0   
Hardware: All   
OS: All   
Whiteboard: storage
Fixed In Version: sf8 Doc Type: Bug Fix
Doc Text:
When creating tasks for imported virtual machine images, the parameters entity id was set to the disk id. As a result, the end method of the import virtual machine command was called before the tasks on all disks were finished. This means that when a virtual machine with multiple disks is imported, the virtual machine and its disks can appear ready even though not all disks have been imported. If a user attempts to run a virtual machine in this state, the virtual machine can become corrupted. Now, the parameters entity id is set to the virtual machine id, so the virtual machine is unlocked only when all disks have been imported.
Story Points: ---
Clone Of:
: 951058 951925 (view as bug list) Environment:
Last Closed: 2013-06-10 21:40:38 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:
Bug Depends On:    
Bug Blocks: 951058, 951925    

Description Daniele 2013-04-09 15:03:01 UTC
Description of problem:
When using the Export storage domain to import a VM with multiple disks assigned, it reports the import of the VM as complete upon the successfull import of each disk. This is wrong. It should only report as complete upon the successfull import of ALL the associated disks.

Moveover, the VM is unlocked after only the import if the first disk allowing the user to make changes to the VM and potentially start it before the remaining disks have been imported.  This is very dangerous and can corrupt the VM.

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

How reproducible:
Always?

Steps to Reproduce:
1.Export a machine with more than 1 disk
2. Import the same machine
3. Check the status of the machine. It will unlock as soon as the first disk is imported.
  
Actual results:
During an import, a machine unlocks as soon as the first disk is imported.

Expected results:
The machine to unlock only when the WHOLE import process is finished.

Additional info:

Comment 2 Lee Yarwood 2013-04-10 10:22:54 UTC
Fixed by the following upstream commit http://gerrit.ovirt.org/#/c/11326/

Comment 5 Allon Mureinik 2013-04-10 15:17:08 UTC
on second though, although the same patch handles both bugs, marking as duplicate is wrong, as the repro is not identical.

Moving to ON_QA for separate verification.

Comment 6 Allon Mureinik 2013-04-11 06:45:38 UTC
Removed the reopened keyword - this bug was not reopened by QA, but was flagged reopened automagically after moving out of CLOSED state (which is was moved to by my mistake).

Comment 8 Leonid Natapov 2013-04-18 10:12:37 UTC
sf13.1 Vm stays locked untill all the disks are imported.

Comment 11 errata-xmlrpc 2013-06-10 21:40:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0888.html