Bug 1115543

Summary: Cannot list VMs and templates on export domain - error 500 & java.lang.NullPointerException (NPE)
Product: [Retired] oVirt Reporter: Pavel Novotny <pnovotny>
Component: ovirt-engine-coreAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5CC: amureini, gklein, iheim, rbalakri, tnisan, yeylon, yzaslavs
Target Milestone: ---Keywords: Regression
Target Release: 3.5.0Flags: tnisan: needinfo? (yzaslavs)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_beta2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:21:06 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:
Bug Depends On:    
Bug Blocks: 1073943    
Attachments:
Description Flags
engine.log none

Description Pavel Novotny 2014-07-02 14:57:47 UTC
Created attachment 914200 [details]
engine.log

Description of problem:
Listing of VMs or templates on an export domain doesn't work. Engine returns error 500 with an NPE traceback in engine.log.
It's reproducible in GUI as well as in REST API.

It's regression against ovirt-engine-3.5.0-0.0.master.20140605145557.git3ddd2de.el6.noarch (alpha2).

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch (beta)

How reproducible:
100%

Steps to Reproduce:
1. Have an active export domain with some VMs and templates stored there.
2. In GUI, select the storage and go to the VM Import or Template Import sub-tab.
3.

Actual results:
Error dialog: "Error while executing action: A Request to the Server failed with the following Status Code: 500"
Plus an NPE traceback in engine.log (attached).

Expected results:
VMs and templates are listed.

Additional info:

REST API also doesn't work:

GET /ovirt-engine/api/storagedomains/<uuid>/vms/

-> response:
<fault>
  <reason>Operation Failed</reason>
  <detail>java.lang.reflect.InvocationTargetException</detail>
</fault>

Comment 1 Maor 2014-07-02 17:47:05 UTC
It looks related to the context change although the constructor in the query seems to be valid but we do get a reflection error in the log.
I will try to debug this for better insights

Comment 2 Tal Nisan 2014-07-03 07:37:29 UTC
Yair, please have a look also, it looks like a regression by the context change in the queries

Comment 3 Maor 2014-07-05 23:04:26 UTC
I have tried to reproduce this on muster (commit a3a2938aea2edc8312b01f071e5c9b8653839338)
It seems that REST is working, same for GUI, moving this to Modify, so it can be re-examed in the next build

Comment 4 Pavel Novotny 2014-07-25 12:45:29 UTC
Verified in ovirt-engine-3.5.0-0.0.master.20140722232058.git8e1babc.el6.noarch (beta2).

Listing VMs and templates from an export storage domain now works ok. No errors appear in engine.log also.

REST API works too. GET requests to resources `/ovirt-engine/api/storagedomains/<uuid>/vms/` and `/ovirt-engine/api/storagedomains/<uuid>/templates/` return correct data.

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