[ovirt-users] REST API - Problem when trying to retrieve vms list
Juan Hernández
jhernand at redhat.com
Wed Feb 24 15:34:49 UTC 2016
On 02/19/2016 09:22 AM, jaumotte, styve wrote:
> Hi everyone,
>
> I confirm that the field "guestos_kernel_version" crash the REST API. When I change manually the value for a test VM, no more error. I try to update the kernel but the new one "2.6.37.6-24-default" causes a crash again. Not exactly the same error in the log but I think It fires an exception when parsin this value :
>
>
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_71]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_71]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source) [:1.8.0_71]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_71]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]
> at org.ovirt.engine.api.restapi.types.MappingLocator$MethodInvokerMapper.map(MappingLocator.java:150) [restapi-types.jar:]
> ... 82 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException
>
>
Just wanted to confirm that this is a bug in the server:
The API crashes when the guest kernel operating system contains
unexpected values
https://bugzilla.redhat.com/1311616
>
>
> Réponse ou transfert de la part de Styve JAUMOTTE
> -----Message d'origine-----
> De : Alexander Wels [mailto:awels at redhat.com]
> Envoyé : jeudi 18 février 2016 21:05
> À : jaumotte, styve
> Cc : users at ovirt.org
> Objet : Re: [ovirt-users] REST API - Problem when trying to retrieve vms list
>
> On Thursday, February 18, 2016 07:53:08 PM jaumotte, styve wrote:
>> Thanks for your quick reply, I found what is the origin of my error
>> ... all the machines which cause problems are old OpenSUSE 11 with
>> default kernel version "2.6.37.1-1.2-default". It seems that "1.2"
>> part can't be parsed correctly.
>>
>> I don't know if it is a bug from API or a problem of the kernel
>> version I'm using.
>>
>>
>
> I am pretty sure its a bug in the API, it shouldn't bomb like that. It should do something more sensible in the case of a kernel version it can't parse properly.
>
>>
>> Réponse ou transfert de la part de Styve JAUMOTTE -----Message
>> d'origine----- De : Alexander Wels [mailto:awels at redhat.com] Envoyé :
>> jeudi 18 février 2016 17:23 À : users at ovirt.org Cc : jaumotte, styve
>> Objet : Re: [ovirt-users] REST API - Problem when trying to retrieve
>> vms list On Thursday, February 18, 2016 03:58:03 PM jaumotte, styve
>> wrote:
>>> Hi everybody,
>>>
>>> Since fews days I can't get vms list from rest api. I always have
>>> the same return when I try https://myengine.mydomain/api/vms :
>>>
>>> <fault>
>>> <reason>Operation Failed</reason>
>>> </fault>
>>>
>>> I suspect that for new vm, some properties are malformed, but I
>>> can't identify them. If I ask
>>> https://myengine.mydomain/api/vms?search=dev , vms including dev in
>>> their name are return. If I ask
>>> https://myengine.mydomain/api/vms?search=xtypo , Operation Failed returns !
>>>
>>> I look at the log on the engine, but I don't find any answers.
>>>
>>> If someone have any ideas ... thank you !!
>>
>> Looking at the exception and the code it appears you have something
>> strange in guestos_kernel_version in vm_dynamic for that VM. In
>> particular the revision part of that string. Its giving an index out
>> of bounds, and the array it is looking at is split from that string on
>> '-' so I am guessing the string in the database ends with - instead of
>> -nn where nn is some number.
>>
>> Now I don't know how that string is populated, but it must broken somehow.
>>
>>> Here the log :
>>>
>>> 2016-02-18 16:43:03,591 ERROR
>>> [org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMa
>>> pp er] (default task-23) [] Mapping exception while processing "GET"
>>> request for path "/vms" 2016-02-18 16:43:03,591 ERROR
>>> [org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMa
>>> pp
>>> er]
>>> (default task-23) [] Exception:
>>> org.ovirt.engine.api.restapi.utils.MappingException:
>>> java.lang.reflect.InvocationTargetException at
>>> org.ovirt.engine.api.restapi.types.MappingLocator$MethodInvokerMapper.
>>> map(M
>>> appingLocator.java:155) [restapi-types.jar:] at
>>> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.map(Ab
>>> st
>>> ractB
>>> ackendResource.java:65) [restapi-jaxrs.jar:] at
>>> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.map(Ab
>>> st
>>> ractB
>>> ackendResource.java:61) [restapi-jaxrs.jar:] at
>>> org.ovirt.engine.api.restapi.resource.BackendVmsResource.mapCollecti
>>> on
>>> (Back
>>> endVmsResource.java:570) [restapi-jaxrs.jar:] at
>>> org.ovirt.engine.api.restapi.resource.BackendVmsResource.list(Backen
>>> dV
>>> msRes
>>> ource.java:94) [restapi-jaxrs.jar:] at
>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [rt.jar:1.8.0_71] at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
>>> .j
>>> ava:6
>>> 2) [rt.jar:1.8.0_71] at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
>>> ss
>>> orImp
>>> l.java:43) [rt.jar:1.8.0_71] at
>>> java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]
>>> at
>>> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl
>>> .j
>>> ava:1
>>> 37) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(Resourc
>>> eM
>>> ethod
>>> Invoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodI
>>> nvoker
>>> .
>>> java:250) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodI
>>> nvoker
>>> .
>>> java:237) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDisp
>>> atcher
>>> .
>>> java:356) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDisp
>>> atcher
>>> .
>>> java:179) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher
>>> .s
>>> ervic
>>> e(ServletContainerDispatcher.java:220)
>>> [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.serv
>>> ic
>>> e(Htt
>>> pServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.serv
>>> ic
>>> e(Htt
>>> pServletDispatcher.java:51) [resteasy-jaxrs-3.0.10.Final.jar:] at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>>> [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final] at
>>> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHan
>>> dl
>>> er.ja
>>> va:86) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:130) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(Curren
>>> tF
>>> ilter
>>> .java:66) [interface-common-jaxrs.jar:] at
>>> org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(Curren
>>> tF
>>> ilter
>>> .java:48) [interface-common-jaxrs.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.doFilter(
>>> Re
>>> stApi
>>> SessionMgmtFilter.java:81) [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.EnforceAuthFilter.doFilter(Enforce
>>> Au
>>> thFil
>>> ter.java:39) [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.LoginFilter.doFilter(LoginFilter.j
>>> av
>>> a:75)
>>> [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.NegotiationFilter.doFilter(Negotia
>>> ti
>>> onFil
>>> ter.java:113) [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.BasicAuthenticationFilter.doFilter
>>> (B
>>> asicA
>>> uthenticationFilter.java:90) [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.SessionValidationFilter.doFilter(S
>>> es
>>> sionV
>>> alidationFilter.java:77) [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.EngineSessionTokenAuthenticationFi
>>> lt
>>> er.do
>>> Filter(EngineSessionTokenAuthenticationFilter.java:31) [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.core.aaa.filters.RestApiSessionValidationFilter.doF
>>> il
>>> ter(R
>>> estApiSessionValidationFilter.java:35) [aaa.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(C
>>> SR
>>> FProt
>>> ectionFilter.java:111) [interface-common-jaxrs.jar:] at
>>> org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(C
>>> SR
>>> FProt
>>> ectionFilter.java:102) [interface-common-jaxrs.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> org.ovirt.engine.api.common.security.CORSSupportFilter.doFilter(CORS
>>> Su
>>> pport
>>> Filter.java:183) [interface-common-jaxrs.jar:] at
>>> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:6
>>> 0) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(
>>> Fi
>>> lterH
>>> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandl
>>> er
>>> .java
>>>
>>> :85) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>>
>>> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.han
>>> dl
>>> eRequ
>>> est(ServletSecurityRoleHandler.java:62)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest
>>> (S
>>> ervle
>>> tDispatchingHandler.java:36)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
>>> at
>>> org.wildfly.extension.undertow.security.SecurityContextAssociationHa
>>> nd
>>> ler.h
>>> andleRequest(SecurityContextAssociationHandler.java:78) at
>>> io.undertow.server.handlers.PredicateHandler.handleRequest(Predicate
>>> Ha
>>> ndler
>>> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.security.SSLInformationAssociationHandl
>>> er
>>> .hand
>>> leRequest(SSLInformationAssociationHandler.java:131)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandl
>>> er
>>> .hand
>>> leRequest(ServletAuthenticationCallHandler.java:57)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.server.handlers.PredicateHandler.handleRequest(Predicate
>>> Ha
>>> ndler
>>> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.security.handlers.AuthenticationConstraintHandler.handle
>>> Re
>>> quest
>>> (AuthenticationConstraintHandler.java:51)
>>> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.security.handlers.AbstractConfidentialityHandler.handleR
>>> eq
>>> uest(
>>> AbstractConfidentialityHandler.java:46)
>>> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.security.ServletConfidentialityConstrai
>>> nt
>>> Handl
>>> er.handleRequest(ServletConfidentialityConstraintHandler.java:64)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.security.ServletSecurityConstraintHandl
>>> er
>>> .hand
>>> leRequest(ServletSecurityConstraintHandler.java:56)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.security.handlers.AuthenticationMechanismsHandler.handle
>>> Re
>>> quest
>>> (AuthenticationMechanismsHandler.java:58)
>>> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHand
>>> le
>>> r.han
>>> dleRequest(CachedAuthenticatedSessionHandler.java:70)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.security.handlers.SecurityInitialHandler.handleRequest(S
>>> ec
>>> urity
>>> InitialHandler.java:76) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
>>> at
>>> io.undertow.server.handlers.PredicateHandler.handleRequest(Predicate
>>> Ha
>>> ndler
>>> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.ha
>>> nd
>>> leReq
>>> uest(JACCContextIdHandler.java:61) at
>>> io.undertow.server.handlers.PredicateHandler.handleRequest(Predicate
>>> Ha
>>> ndler
>>> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.server.handlers.PredicateHandler.handleRequest(Predicate
>>> Ha
>>> ndler
>>> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstReques
>>> t(
>>> Servl
>>> etInitialHandler.java:261)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(S
>>> er
>>> vletI
>>> nitialHandler.java:248)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
>>> at
>>> io.undertow.servlet.handlers.ServletInitialHandler.access$000(Servle
>>> tI
>>> nitia
>>> lHandler.java:77) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(S
>>> er
>>> vletI
>>> nitialHandler.java:167)
>>> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
>>> at
>>> io.undertow.server.Connectors.executeRootHandler(Connectors.java:199
>>> ) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:
>>> 76
>>> 1) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor
>>> .j
>>> ava:1
>>> 142) [rt.jar:1.8.0_71] at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecuto
>>> r.java
>>> :
>>> 617) [rt.jar:1.8.0_71] at java.lang.Thread.run(Thread.java:745)
>>> [rt.jar:1.8.0_71] Caused by:
>>> java.lang.reflect.InvocationTargetException
>>>
>>> at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown
>>>
>>> Source) [:1.8.0_71] at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
>>> ss
>>> orImp
>>> l.java:43) [rt.jar:1.8.0_71] at
>>> java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]
>>> at org.ovirt.engine.api.restapi.types.MappingLocator$MethodInvokerMapper.
>>> map(M
>>> appingLocator.java:150) [restapi-types.jar:] ... 83 more Caused by:
>>> java.lang.ArrayIndexOutOfBoundsException: 1
>>>
>>> at
>>>
>>> org.ovirt.engine.api.restapi.types.VersionMapper.fromKernelVersionSt
>>> ri
>>> ng(Ve
>>> rsionMapper.java:52) [restapi-types.jar:] at
>>> org.ovirt.engine.api.restapi.types.VmMapper.map(VmMapper.java:446)
>>> [restapi-types.jar:] at
>>> org.ovirt.engine.api.restapi.types.VmMapper.map(VmMapper.java:330)
>>> [restapi-types.jar:] ... 87 more
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
More information about the Users
mailing list