Bug 1011489 - /api/vms Rest API 500 ERROR After upgrade to 3.3
/api/vms Rest API 500 ERROR After upgrade to 3.3
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-api (Show other bugs)
3.3
All Linux
unspecified Severity urgent
: ---
: 3.3.1
Assigned To: Michael Pasternak
infra
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-24 08:19 EDT by Yamakasi
Modified: 2014-01-12 19:39 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-25 07:02:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Debug logs (159.53 KB, application/zip)
2013-11-14 12:10 EST, Joop van de Wege
no flags Details

  None (edit)
Description Yamakasi 2013-09-24 08:19:51 EDT
Description of problem:

After upgrading to 3.3 the REST API doesn't show the VM's anymore from (one) DC.

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

3.3

How reproducible:

go to http://ovirtengine/api/vms

Steps to Reproduce:
1. See above
2.
3.

Actual results:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
	org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
	org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
	org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
	org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
	org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

root cause

java.lang.NullPointerException
	org.ovirt.engine.api.common.util.LinkHelper.getCollection(LinkHelper.java:523)
	org.ovirt.engine.api.common.util.LinkHelper.getUriBuilder(LinkHelper.java:569)
	org.ovirt.engine.api.restapi.resource.AbstractBackendResource.linkSubCollections(AbstractBackendResource.java:287)
	org.ovirt.engine.api.restapi.resource.AbstractBackendResource.addLinks(AbstractBackendResource.java:228)
	org.ovirt.engine.api.restapi.resource.AbstractBackendResource.addLinks(AbstractBackendResource.java:218)
	org.ovirt.engine.api.restapi.resource.BackendVmsResource.mapCollection(BackendVmsResource.java:407)
	org.ovirt.engine.api.restapi.resource.BackendVmsResource.list(BackendVmsResource.java:71)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:606)
	org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
	org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
	org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
	org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
	org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
	org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
JBoss Web/7.0.13.Final


Expected results:

List of the VM's


Additional info:

I have two DC's where one is capable of displaying but not usable on creating a host in Foreman, for the other DC it's the other way around. No list but capable to create a VM.
Comment 1 Michael Pasternak 2013-09-24 08:37:24 EDT
Yamakasi,

what build you're using, can i have the entire log?
Comment 2 Yamakasi 2013-09-24 08:55:02 EDT
Hi,

This comes right from a webbrowser when I visit the url for the VM's.

Other API requests work OK, hosts, disks, etc.

At the moment I don't have any other log.

How can I help you out ?

Thanks!
Comment 3 Michael Pasternak 2013-09-24 09:00:44 EDT
(In reply to Yamakasi from comment #2)
> Hi,
> 
> This comes right from a webbrowser when I visit the url for the VM's.
> 
> Other API requests work OK, hosts, disks, etc.
> 
> At the moment I don't have any other log.
> 
> How can I help you out ?

to try and reproduce your issue, at least i need to know what build you're using.

> 
> Thanks!
Comment 4 Yamakasi 2013-09-24 10:25:16 EDT
Version 3.3.0-4.el6
Comment 5 Yamakasi 2013-09-26 01:58:24 EDT
Hi Micheal,

I need to appologize for my last too short reply, I was in a hurry and wanted to let you know.

Do you already have some news ?

Regards,

Matt
Comment 6 Yamakasi 2013-10-01 04:13:35 EDT
Is there any news on this ? It's actually a big issue that this error exists!
Comment 7 Samuli Heinonen 2013-10-18 07:07:11 EDT
Hello,

Is this same bug as described on this ML thread http://www.mail-archive.com/users@ovirt.org/msg09574.html and afaik fixed with this http://gerrit.ovirt.org/#/c/18061/? What's the status of this fix?

-samuli
Comment 8 Itamar Heim 2013-10-21 00:58:41 EDT
doron - this seem to have not been backported to 3.3.0.1 for some reason.

it is fixed for 3.3.1 beta via 
http://gerrit.ovirt.org/#/c/19217/

(Samuli - don't upgrade to 3.3.1 beta until it is re-spinned for some upgrade issue)
Comment 9 Sandro Bonazzola 2013-11-06 10:59:59 EST
Shouldn't this be in modified state then?
Comment 10 Joop van de Wege 2013-11-14 08:41:33 EST
Just install 3.3.1 on FC19 but still can't connect from Foreman (1.3.1) to oVirt.
Comment 11 Joop van de Wege 2013-11-14 08:44:44 EST
Sorry forget to add that doing https://engine/api/vms will give me the error from the first post.
Comment 12 Michael Pasternak 2013-11-14 09:31:28 EST
(In reply to Joop van de Wege from comment #11)
> Sorry forget to add that doing https://engine/api/vms will give me the error
> from the first post.

Sorry,

But i just can't reproduce this on my environment, to tackle this, i need the
following;

1. enable full debug, see details at [1]
2. engine.log, server.log (you can find them at /var/log/ovirt-engine)

[1] http://www.ovirt.org/OVirt_Engine_Development_Environment#Advanced_Usage
Comment 13 Joop van de Wege 2013-11-14 12:09:05 EST
(In reply to Michael Pasternak from comment #12)
> (In reply to Joop van de Wege from comment #11)
> > Sorry forget to add that doing https://engine/api/vms will give me the error
> > from the first post.
> 
> Sorry,
> 
> But i just can't reproduce this on my environment, to tackle this, i need the
> following;
> 
> 1. enable full debug, see details at [1]
> 2. engine.log, server.log (you can find them at /var/log/ovirt-engine)
> 
> [1] http://www.ovirt.org/OVirt_Engine_Development_Environment#Advanced_Usage
Attached the logs requested. The request for /api/vms is around the following timestamp of all 3 logs --> 2013-11-14 16:39:51,657

If needed I can do more testing.
Comment 14 Joop van de Wege 2013-11-14 12:10:38 EST
Created attachment 824051 [details]
Debug logs
Comment 15 Sandro Bonazzola 2013-11-15 05:59:43 EST
Should we reopen this? If so, is this to be considered blocker for 3.3.1?
Comment 16 Michael Pasternak 2013-11-17 01:46:59 EST
(In reply to Sandro Bonazzola from comment #15)
> Should we reopen this? If so, is this to be considered blocker for 3.3.1?

i believe this is a local issue of this specific environment, if [1] would
have an issue, it was reported by others a while ago,

i'll check anyway.


[1] GET /api/vms
Comment 17 Joop van de Wege 2013-11-17 04:23:20 EST
updated to 3.3.1-2.fc19 (from the beta repo) and now foreman can get a list of VMs and GET /api/vms works too :-)


Joop
Comment 18 Sandro Bonazzola 2013-11-25 07:02:19 EST
oVirt 3.3.1 has been released

Note You need to log in before you can comment on or make changes to this bug.