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

Bug 891879

Summary: Rollback procedure for import of VM fails in situation that error - disk already exists in DB - appears
Product: Red Hat Enterprise Virtualization Manager Reporter: Tomas Dosek <tdosek>
Component: ovirt-engineAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 3.1.0CC: dyasny, iheim, lpeer, lyarwood, michal.skrivanek, rgolan, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-28 13:07:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 891882    
Bug Blocks:    
Attachments:
Description Flags
engine.log none

Description Tomas Dosek 2013-01-04 11:03:46 UTC
Created attachment 672354 [details]
engine.log

Description of problem:

During customer's update to 3.1 we hit strange issue where rollback procedure fails to clean up after failed task.

After such a failed task there are remnants of data both on storage and in DB.

Please follow Steps to reproduce.

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

How reproducible:
100 %

Steps to Reproduce:
1. In 2.2 environment prepare VM with 4 disks and 2 snapshots
2. Export the VM (DO NOT USE collapse snapshots and force override settings)
3. Import the VM to 3.1 RHEV (USE collapse snapshots settings for import)
  
Actual results:
Import fails with error Disk already exists in DB and rollback leaves parts of the import operation in DB (i.e. entries in vm_devices and base_disks table). It also leaves data on storage (disks of the VM that should be imported). Both of the above mentioned complicates another try to import the VM again.

Expected results:
Rollback should clean up the task and all relevant data in DB and on storage.

Additional info:
Attaching engine log