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

Bug 1117202

Summary: Creating a template from a vm which was created from a "crossed domain template" as thin fails with Bll and Irs exceptions
Product: [Retired] oVirt Reporter: Ori Gofen <ogofen>
Component: ovirt-engine-webadminAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.5CC: acanan, amureini, bugs, ecohen, gklein, iheim, mgoldboi, rbalakri, tnisan, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_rc1.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:44:03 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:
Attachments:
Description Flags
vdsm+engine logs none

Description Ori Gofen 2014-07-08 09:26:29 UTC
Created attachment 916315 [details]
vdsm+engine logs

Description of problem:
This bug relates to BZ #1111176 , please read about what I mean by "crossed domain template".

The operation of creating a vm from a "crossed domain template" as thin on block domain should be unavailable on ui but it stays available on python-sdk,rest-api etc.  

When trying to create a template from such a vm it fails,

a message pops on the webadmin "Error while executing action New VM Template: Incorrect Volume format"

from oVirt-engine's log: 

2014-07-08 12:03:53,689 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (ajp--127.0.0.1-8702-13) [11260d8d] Command CopyImageVDSCommand( storagePoolId = 00000002-0002-0002-0002-0000000001e1, ignoreFailoverLimit = false, storageDomainId = c240a1a3-35e1-4b83-bf34-807b9f5ce4d7, imageGroupId = 02b45928-4a83-4da5-9f8e-bacd409540d1, imageId = c9d5e287-65d0-44d6-a6c6-35376f198a8f, dstImageGroupId = 29f1f937-460c-4c39-bfd9-e7db45a3e0cb, vmId = 7c6d23ad-a0ac-4019-a40e-4611ab4cf579, dstImageId = f55b96cd-e1e4-4af1-b03c-95eaa57ffc26, imageDescription = Active VM, dstStorageDomainId = c240a1a3-35e1-4b83-bf34-807b9f5ce4d7, copyVolumeType = SharedVol, volumeFormat = RAW, preallocate = Sparse, postZero = false, force = false) execution failed. Exception: IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Incorrect Volume format: ('RAW',)
2014-07-08 12:03:53,705 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (ajp--127.0.0.1-8702-13) [11260d8d] FINISH, CopyImageVDSCommand, return: 00000000-0000-0000-0000-000000000000, log id: 262f2c3a
2014-07-08 12:03:53,706 ERROR [org.ovirt.engine.core.bll.CreateImageTemplateCommand] (ajp--127.0.0.1-8702-13) [11260d8d] Command org.ovirt.engine.core.bll.CreateImageTemplateCommand throw Vdc Bll exception. With error message VdcBLLException: org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Incorrect Volume format: ('RAW',) (Failed with error IncorrectFormat and code 202)
2014-07-08 12:03:53,727 INFO  [org.ovirt.engine.core.bll.tasks.AsyncTaskManager] (ajp--127.0.0.1-8702-13) [11260d8d] Removed task ab162ea5-d164-46f8-9a31-3bda7ae5a38c from DataBase
2014-07-08 12:03:53,737 ERROR [org.ovirt.engine.core.bll.CreateImageTemplateCommand] (ajp--127.0.0.1-8702-13) Transaction rolled-back for command: org.ovirt.engine.core.bll.CreateImageTemplateCommand.
2014-07-08 12:03:53,743 INFO  [org.ovirt.engine.core.utils.transaction.TransactionSupport] (ajp--127.0.0.1-8702-13) transaction rolled back
2014-07-08 12:03:53,747 ERROR [org.ovirt.engine.core.bll.AddVmTemplateCommand] (ajp--127.0.0.1-8702-13) Command org.ovirt.engine.core.bll.AddVmTemplateCommand throw Vdc Bll exception. With error message VdcBLLException: IncorrectFormat (Failed with error IncorrectFormat and code 202)

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

How reproducible:
100%

Steps to Reproduce:
Setup:two domains (one nfs,one iscsi)
1.add vm+nfs thin disk
2.create a template from vm,copy template's disk to iscsi
3.create a vm from that vm (allocation policy thin,on iscsi
4.try to create a template from this vm

Actual results:
operation fails with Bll and Irs exceptions

Expected results:
operation should be successful or creating a vm from a "crossed domain template" shouldn't be aloud on all api's

Additional info:

Comment 1 Ori Gofen 2014-07-08 09:31:45 UTC
**Steps to Reproduce (line 3) 
should be 3.create a vm from that template (allocation policy thin,on iscsi domain)

Comment 2 Allon Mureinik 2014-08-27 16:45:09 UTC
Tal, I believe that the recent changes introduced to fix bug 1128776 should have solved this one too. Can you confirm/refute?

Comment 3 Tal Nisan 2014-08-31 13:25:11 UTC
Indeed, tried to reproduce just in case and failed to do so

Comment 4 Ori Gofen 2014-09-02 15:08:33 UTC
verified on rc1.1

Comment 5 Sandro Bonazzola 2014-10-17 12:44:03 UTC
oVirt 3.5 has been released and should include the fix for this issue.