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

Bug 891882

Summary: Import of VM, which was created in 2.2, with more than one disk and more snapshots fails
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.1CC: 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 12:07:03 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:    
Bug Blocks: 891879    
Attachments:
Description Flags
engine.log none

Description Tomas Dosek 2013-01-04 11:10:49 UTC
Created attachment 672357 [details]
engine.log

Description of problem:

Import of VM that was created in RHEV 2.2 environment fails in case the VM is equipped with more than one disk and more snapshots.


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

How reproducible:
100 %

Steps to Reproduce:
1. Create a VM in 2.2 RHEV with 4 disks and 2 snapshots
2. Export the VM (DO NOT USE collapse snapshots and force override settings)
3. Try to import the VM to 3.1 RHEV-M (USE collapse snapshots settings)
  
Actual results:
Import fails - with following exception being thrown to engine.log:
2012-12-18 09:53:09,899 ERROR [org.ovirt.engine.core.bll.ImportVmCommand] (pool-4-thread-49) [6d563c0e] Command org.ovirt.engine.core.bll.ImportVmCommand throw exception: org.springframework.dao.DuplicateKeyException: CallableStatementCallback; SQL [{call insertbasedisk(?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "pk_disks"

Expected results:
Should work ok

Additional info:
Attaching full engine.log