Bug 885459

Summary: [Storage][Text] Wrong error message when import VM fails.
Product: Red Hat Enterprise Virtualization Manager Reporter: Leonid Natapov <lnatapov>
Component: ovirt-engineAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: vvyazmin <vvyazmin>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: abaron, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, thirupathi_jittaboina, yeylon, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: All   
OS: All   
Whiteboard: storage
Fixed In Version: sf3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Bug Depends On: 890951, 895563    
Bug Blocks: 915537    

Description Leonid Natapov 2012-12-09 15:24:34 UTC
Description of problem:
[Storage] Wrong error message when import VM fails.
When import VM fails because problems with the VM's disk the following error appears:

"Error while executing action: Cannot copy Template. VM's Image does not exist."

There is no templates in the setup only VMs. Instead of word 'template' there should be 'VM'.



2012-12-09 17:19:09,077 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8702-9) FINISH, DoesImageExistVDSCommand, return: false, log id: 783fc940
2012-12-09 17:19:09,077 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8702-9) CanDoAction of action ImportVm failed. Reasons:VAR__ACTION__COPY,VAR__TYPE__VM_TEMPLATE,ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST,VAR__ACTION__IMPORT,VAR__TYPE__VM

Comment 1 Allon Mureinik 2012-12-10 08:01:02 UTC
Steps to reproduce:

1. Create a VM
2. Export it
3. Remove one of its images from the export domain
4. Attempt to import it.

Comment 2 Allon Mureinik 2012-12-10 08:08:55 UTC
Patch posted upstream:

==
core: ImportVm cleanup: action and type params

The $action and $type params were set in canDoAction_afterCloneVm, which
caused them to be empty if the command failed during
canDoAction_beforeCloneVm.

This patch moves them to the setActionMessagesParameters() method, so
they are set if any failure occurred, regardless of its stage.

Change-Id: I9b3148cd54146ac0b90924464cd27fb54160889b
Bug-Url: https://bugzilla.redhat.com/885459
Signed-off-by: Allon Mureinik <amureini>
==

Comment 3 Allon Mureinik 2012-12-18 08:47:39 UTC
Merged upstream

Comment 4 Leonid Natapov 2013-01-30 14:28:21 UTC
sf5. fixed.

Comment 5 Itamar Heim 2013-06-11 09:37:35 UTC
3.2 has been released

Comment 6 Itamar Heim 2013-06-11 09:37:41 UTC
3.2 has been released

Comment 7 Itamar Heim 2013-06-11 09:51:52 UTC
3.2 has been released

Comment 8 thirupathi 2014-05-10 08:11:32 UTC
Hi, I'm Using RHEV 3.3 angetting below error while importing VM image from export doamin.

2014-05-10 16:07:28,236 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] START, DoesImageExistVDSCommand( storagePoolId = 1e2a4217-e9c4-419b-ab1c-f8865b61c827, ignoreFailoverLimit = false, storageDomainId = 63a269c0-2fa6-4705-b617-2af2f174de34, imageGroupId = 53d3a77a-b765-487f-950a-21db75ec5048, imageId = eaf474ea-7c74-4a87-b9fa-48e483a100e2), log id: 33f02bca
2014-05-10 16:07:28,256 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] IrsBroker::getImageInfo::Failed getting image info imageId = eaf474ea-7c74-4a87-b9fa-48e483a100e2 does not exist on domainName = EXPORT_DOMAIN , domainId = 63a269c0-2fa6-4705-b617-2af2f174de34,  error code: ImagePathError, message: Image path does not exist or cannot be accessed/created: ('/rhev/data-center/mnt/nocrhevm01.nlb.gov.sg:_exports_migrate/63a269c0-2fa6-4705-b617-2af2f174de34/images/53d3a77a-b765-487f-950a-21db75ec5048',)
2014-05-10 16:07:28,257 WARN  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] executeIrsBrokerCommand: getImageInfo on eaf474ea-7c74-4a87-b9fa-48e483a100e2 threw an exception - assuming image doesnt exist.
2014-05-10 16:07:28,257 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] FINISH, DoesImageExistVDSCommand, return: false, log id: 33f02bca
2014-05-10 16:07:28,257 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] CanDoAction of action ImportVm failed. Reasons:VAR__ACTION__IMPORT,VAR__TYPE__VM,ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST
2014-05-10 16:07:28,258 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8702-2) [3714bee2] Lock freed to object EngineLock [exclusiveLocks= key: noccmsapp32v value: VM_NAME
, sharedLocks= key: d19ebc88-9f5f-47be-8ee4-e3b4c0dc4695 value: REMOTE_VM
]
2014-05-10 16:07:28,419 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (ajp-/127.0.0.1:8702-4) START, GetVmsInfoVDSCommand( storagePoolId = 1e2a4217-e9c4-419b-ab1c-f8865b61c827, ignoreFailoverLimit = false, storageDomainId = 63a269c0-2fa6-4705-b617-2af2f174de34, vmIdList = null), log id: 7b948c31
2014-05-10 16:07:28,431 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (ajp-/127.0.0.1:8702-4) FINISH, GetVmsInfoVDSCommand, log id: 7b948c31

Comment 9 Allon Mureinik 2014-05-10 10:00:25 UTC
Hi thirupathi, and thanks for reporting this issue!

In order to handle the issue effectively, please don't use old bugs to report new cases. I've opened bug 1096441 for it - let's track it there.