Bug 806640 - exception when cloning vm from a snapshot which contains illegal drive
Summary: exception when cloning vm from a snapshot which contains illegal drive
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Yair Zaslavsky
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-25 16:37 UTC by Avihai Shoham
Modified: 2015-03-05 00:17 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-17 07:49:28 UTC
oVirt Team: ---


Attachments (Terms of Use)
engine log (784.05 KB, application/octet-stream)
2012-03-25 16:39 UTC, Avihai Shoham
no flags Details

Description Avihai Shoham 2012-03-25 16:37:00 UTC
when cloning vm (server type) via UI i gets "ovirt internal error'
looking in engine log there is  SQLErrorCodeSQLExceptionTranslator

http://pastebin.test.redhat.com/82844

observed by Yzaslavs

Comment 1 Avihai Shoham 2012-03-25 16:39:56 UTC
Created attachment 572545 [details]
engine log

Comment 2 Yair Zaslavsky 2012-03-25 17:48:08 UTC
This happens when the image in the configuration is illegal.
For illegal image a new disk is created.
The fix performs the following:
a. Checks that indeed illegal image was created as the disk of the image was removed after the snapshot.
b. In this case - adds the disk without vm device 
c. Vm device will be added later on during vm device copying from the vm configuration (before the fix, this was the reason for the attempt to insert the same vm device twice)

http://gerrit.ovirt.org/#change,3085

Comment 3 Yair Zaslavsky 2012-03-26 07:14:04 UTC
merged - commit hash c882ad75c82e6735960d7088d78f017039c43c00

Comment 4 Avihai Shoham 2012-03-26 11:48:24 UTC
now the cloning succeed but since the snapshot has "illegal" status ,the cloning VM created with one disk only

vm_device table is missing info of one disk



engine=# SELECT vm_guid  from vm_static  where vm_name = 'clone4';
               vm_guid                
--------------------------------------
 b2c70cca-7b8f-420e-82b0-be585986e335
(1 row)

engine=# 
engine=# SELECT * from vm_device where vm_id = 'b2c70cca-7b8f-420e-82b0-be585986e335';
              device_id               |                vm_id                 | type | device | address | boot_order |                  spec_params                  | is_managed | is_plugged | is_readonly 
--------------------------------------+--------------------------------------+------+--------+---------+------------+-----------------------------------------------+------------+------------+-------------
 fc8de9b4-493f-42ff-bccf-320068d82a81 | b2c70cca-7b8f-420e-82b0-be585986e335 | disk | disk   |         |          1 | deviceId=fc8de9b4-493f-42ff-bccf-320068d82a81 | t          | t          | f
(1 row)

Comment 5 Yair Zaslavsky 2012-03-26 14:15:13 UTC
Fixed at commit hash e47cbdced478dce1d331c5a7778fd4d1da3a084a

Comment 6 Avihai Shoham 2012-05-06 07:10:45 UTC
fixed
verified on last dev hash commit b27eef27132cd152d58b6503324a9248374864ab


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