Bug 822440 - [Storage][Clone vm from snapshot] Clone VM fails if the source or destination disk was moved to another storage domain.
[Storage][Clone vm from snapshot] Clone VM fails if the source or destination...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.1.0
Assigned To: Shahar Havivi
Leonid Natapov
storage
:
Depends On: 563300 831913 835346 835347 835723
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-17 06:58 EDT by Leonid Natapov
Modified: 2016-02-10 11:39 EST (History)
10 users (show)

See Also:
Fixed In Version: SI9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:07:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Leonid Natapov 2012-05-17 06:58:02 EDT
[Storage][Clone vm from snapshot] Clone VM fails if the source disk was moved to another storage domain. This happens because the information about domains and disks should be taken from the DB and not from the OVF file.

Scenario:
1.Create VM with one or more disks.
2.Make a snapshot.
3.Go to the disks tab and move one of vm's disks to another storage domain.
4.Come back to VM's snapshots tab and try to clone VM from snapshot.

The operation will fail. GUI will stuck on "Clone VM from snapshot" dialog.

vdsm.log
--------
Thread-64064::ERROR::2012-05-17 12:25:48,487::task::853::TaskManager.Task::(_setError) Task=`52d7b70a-4cdb-4a04-b290-d4bbb6247849`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 861, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 38, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 1376, in copyImage
    pool.validateVolumeChain(sdUUID, srcImgUUID)
  File "/usr/share/vdsm/storage/securable.py", line 63, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 1915, in validateVolumeChain
    image.Image(repoPath).validateVolumeChain(sdUUID, imgUUID)
  File "/usr/share/vdsm/storage/image.py", line 746, in validateVolumeChain
    chain = self.getChain(sdUUID, imgUUID)
  File "/usr/share/vdsm/storage/image.py", line 342, in getChain
    raise se.ImageDoesNotExistInSD(imgUUID, sdUUID)
ImageDoesNotExistInSD: Image does not exist in domain: 'image=6b396566-9f16-4bbb-9842-d8dd03fb9c9a, domain=1c60971a-8647-44ac-ae33-6520887f8843'

engine.log
----------
2012-05-17 13:51:48,362 INFO  [org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand] (ajp--0.0.0.0-8009-41) [65948c88] Running command: MoveOrCopyImageGroupCommand internal: true. Entities affected :  ID: 1c60971a-8647-44ac-ae33-6520887f8843 Type: Storage
2012-05-17 13:51:48,365 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (ajp--0.0.0.0-8009-41) [65948c88] START, CopyImageVDSCommand(storagePoolId = 36cc6fbc-9468-11e1-a5e5-001a4a169789, ignoreFailoverLimit = false, compatabilityVersion = 3.1, storageDomainId = 1c60971a-8647-44ac-ae33-6520887f8843, imageGroupId = 6b396566-9f16-4bbb-9842-d8dd03fb9c9a, imageId = d76bb4c1-596f-47f6-99e7-99bdce5aff58, dstImageGroupId = add5e619-c4b4-440c-844b-4b80985f5ae9, vmId = 0f65a8bc-2139-44a3-ac06-b3d0dde6254f, dstImageId = 13f0e251-4c77-444f-807f-a510760c9f6a, imageDescription = 22, dstStorageDomainId = 1c60971a-8647-44ac-ae33-6520887f8843, copyVolumeType = LeafVol, volumeFormat = RAW, preallocate = Preallocated, postZero = false, force = false), log id: 6d1acf0e
2012-05-17 13:51:48,380 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (ajp--0.0.0.0-8009-41) [65948c88] -- CopyImageVDSCommand::ExecuteIrsBrokerCommand: calling 'copyImage' with two new parameters: description and UUID
2012-05-17 13:51:48,385 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (ajp--0.0.0.0-8009-41) [65948c88] -- copyImage parameters:
                sdUUID=1c60971a-8647-44ac-ae33-6520887f8843
                spUUID=36cc6fbc-9468-11e1-a5e5-001a4a169789
                vmGUID=0f65a8bc-2139-44a3-ac06-b3d0dde6254f
                srcImageGUID=6b396566-9f16-4bbb-9842-d8dd03fb9c9a
                srcVolUUID=d76bb4c1-596f-47f6-99e7-99bdce5aff58
                dstImageGUID=add5e619-c4b4-440c-844b-4b80985f5ae9
                dstVolUUID=13f0e251-4c77-444f-807f-a510760c9f6a
                descr=22

2012-05-17 13:51:48,422 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand] (ajp--0.0.0.0-8009-41) [65948c88] IrsBroker::Failed::CopyImageVDS due to: IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Image does not exist in domain: 'image=6b396566-9f16-4bbb-9842-d8dd03fb9c9a, domain=1c60971a-8647-44ac-ae33-6520887f8843'
2012-05-17 13:51:48,430 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (ajp--0.0.0.0-8009-41) [65948c88] FINISH, CopyImageVDSCommand, return: 00000000-0000-0000-0000-000000000000, log id: 6d1acf0e
2012-05-17 13:51:48,435 ERROR [org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand] (ajp--0.0.0.0-8009-41) [65948c88] Command org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand throw Vdc Bll exception. With error message VdcBLLException: org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Image does not exist in domain: 'image=6b396566-9f16-4bbb-9842-d8dd03fb9c9a, domain=1c60971a-8647-44ac-ae33
Comment 1 Leonid Natapov 2012-05-17 07:36:40 EDT
Cloning VM when user wants to reside VM's disks on another SD also doesn't work.
Same problem.
Comment 2 Itamar Heim 2012-05-30 09:10:44 EDT
yair - please review/comment
Comment 3 Yair Zaslavsky 2012-06-10 08:39:40 EDT
As explained at Comment #1 (I reviewed the code with Leonid when he opened the bug) -
The source diskImage is taken from the OVF that is stored per snapshot.
This is wrong - it should be taken from DB, to reflect any change that might have occurred (i.e - storage domain it resides on) after snapshot was created.
Comment 4 Shahar Havivi 2012-06-13 09:09:08 EDT
posted at: http://gerrit.ovirt.org/#/c/5322/
Comment 5 Shahar Havivi 2012-07-01 07:54:05 EDT
and UI patch at: http://gerrit.ovirt.org/#/c/5801/
Comment 6 Leonid Natapov 2012-07-09 08:52:31 EDT
si9. fixed.

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