Bug 918949

Summary: ovirt-engine-backend : uninformative error while trying to retrieve ISO list when ISO domain is inactive
Product: Red Hat Enterprise Virtualization Manager Reporter: Oded Ramraz <oramraz>
Component: ovirt-engine-restapiAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Gal Amado <gamado>
Severity: medium Docs Contact:
Priority: low    
Version: 3.2.0CC: acanan, amureini, bazulay, bsettle, danken, iheim, lpeer, oramraz, rbalakri, Rhev-m-bugs, scohen, sgotliv, tnisan, yeylon
Target Milestone: ---Flags: abaron: Triaged+
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_beta 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:    
Bug Blocks: 1142923, 1156165    
Attachments:
Description Flags
engine and server logs none

Description Oded Ramraz 2013-03-07 09:45:04 UTC
Description of problem:

When I try to retrieve ISO list from inactive shared ISO domain using CLI I get internal server error ( see additional information ) .
I would expect proper error message which tells me that storage domain is not accessible .

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

[RHEVM shell (connected)]# list files --storagedomain-identifier 7233a711-98e8-4c3c-bcfa-44c4bcc4f6c6 

error: 
status: 500
reason: Internal Server Error
detail: 


## engine log 


2013-03-07 11:39:51,063 ERROR [org.ovirt.engine.core.bll.GetAllImagesListQuery] (ajp-/127.0.0.1:8702-3) Query GetAllImagesListQuery failed. Exception message is null
2013-03-07 11:39:51,064 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-3) Operation Failed: : org.ovirt.engine.api.restapi.resource.BaseBackendResource$BackendFailureException:
        at org.ovirt.engine.api.restapi.resource.BackendResource.getBackendCollection(BackendResource.java:107) [restapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.BackendFilesResource.listFiles(BackendFilesResource.java:77) [restapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.BackendFilesResource.list(BackendFilesResource.java:38) [restapi-jaxrs.jar:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09-icedtea]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09-icedtea]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea]

Comment 1 Oded Ramraz 2013-03-07 09:49:26 UTC
Created attachment 706460 [details]
engine and server logs

Comment 3 Maor 2013-07-10 08:26:47 UTC
There is already an audit log which notifies the problem.
Today, when user want to force refresh the ISO domain repositories and it fails,
Engine can't send messages in the query result, since the GUI could parse them as another ISO domain.
the GUI expects to get null in the query result.

Maybe the fix should be in the Rest probably (BackendFilesResource#listFiles).

Comment 5 Gal Amado 2014-07-30 11:04:09 UTC
verified on oVirt Engine Version: 3.5.0-0.0.master.20140722232058.git8e1babc.el6

the msg was changed to :

[oVirt shell (connected)]# list files --storagedomain-identifier e2b4336b-a560-416f-ab75-246e8476cce5
  ========================= ERROR =======================
  status: 400
  reason: Bad Request
  detail: Cannot get list of images in ISO domain. Please check that the storage domain status is Active
  =======================================================

Comment 7 Allon Mureinik 2015-02-16 19:12:59 UTC
RHEV-M 3.5.0 has been released, closing this bug.

Comment 8 Allon Mureinik 2015-02-16 19:12:59 UTC
RHEV-M 3.5.0 has been released, closing this bug.