Bug 1037441

Summary: [engine-backend] bad handling with code 205 response from vdsm to CopyImageVDS request in engine.log
Product: Red Hat Enterprise Virtualization Manager Reporter: Elad <ebenahar>
Component: ovirt-engineAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, amureini, iheim, lpeer, Rhev-m-bugs, scohen, sgotliv, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: ovirt-3.4.0-beta2 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: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
logs and screenshot none

Description Elad 2013-12-03 07:38:56 UTC
Created attachment 831932 [details]
logs and screenshot

Description of problem:
When engine gets code error 205 from vdsm after a failure in CopyImageVDS, we get this exception in engine.log:

2013-12-02 17:48:17,183 ERROR [org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand] (ajp-/127.0.0.1:8702-7) [104393f0] Command org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand throw Vdc Bll exception. With error message VdcBLLException: VolumeCreationError (Failed with error VolumeCreationError and code 205)
2013-12-02 17:48:17,208 ERROR [org.ovirt.engine.core.bll.AddVmFromTemplateCommand] (ajp-/127.0.0.1:8702-7) [104393f0] Command org.ovirt.engine.core.bll.AddVmFromTemplateCommand throw exception: javax.ejb.EJBTransactionRolledbackException: Could not get JDBC Connection; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction
        at 


Version-Release number of selected component (if applicable):
rhevm-3.3.0-0.37.beta1.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. have a template and copy it to another storage domain
2. maintenance the domain that the original template disk is located on
3. create a VM from the template

 
Actual results:
Engine sends a sdUUID value of the inactive domain as part of the copyImage command (full details of this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1037439)

We're getting the exception that was mentioned above in engine.log and this error message on UI:

"Error while executing action AddVmFromTemplate: Internal Engine Error"

Expected results:
Engine should know how to handle with error code 205 from vdsm 

Additional info: logs and screenshot

Comment 1 Vered Volansky 2013-12-03 19:41:37 UTC
If we're going to fix bz1037439 for the same version this bug won't manifested nor will we be able to verify.

Comment 2 Allon Mureinik 2013-12-04 06:27:41 UTC
There are a bunch of error codes we don't handle there. 
Since bug 1037439 should block this from happening, and since there is no permanent damage, pushing out to 3.4

Comment 6 Maor 2014-01-26 15:57:25 UTC
The issue here is at the CommandBase of the execution flow, which is the infrastructure all the vdc commands use.
Moving the bug to infra

Comment 7 Allon Mureinik 2014-02-03 06:22:58 UTC
Maor,

Patch 23911 was merged. Does this completely solve the issue? If so, please move the bug to MODIFIED.
If not, please explain what's missing.

Comment 8 Maor 2014-02-03 09:55:44 UTC
Please noticed that error 205 is misleading.
The real error is captured by the engine from VDSM and override with code 205.
I changed it also in the bug scope so the error that the engine will throw will be the original error from VDSM.

Comment 9 Elad 2014-02-17 14:03:12 UTC
Failure in CopyImage is handled correctly:

2014-02-17 15:46:58,144 ERROR [org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand] (ajp--127.0.0.1-8702-5) [72a83231] Command org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand throw Vdc Bll exception. Wit
h error message VdcBLLException: org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException: IRSGenericException: IRSErrorException: Failed to CopyImageVDS, error = Storage domain does not exist: ('14bf0af4-4264-
47e6-a18f-690f574a0827',), code = 358 (Failed with error StorageDomainDoesNotExist and code 358)


Verified on ovirt-engine-3.4.0-0.7.beta2.el6.noarch

Comment 10 Itamar Heim 2014-06-12 14:08:39 UTC
Closing as part of 3.4.0