[ovirt-users] REST API - Problem when trying to retrieve vms list

jaumotte, styve s.jaumotte at maine-et-loire.fr
Thu Feb 18 19:53:08 UTC 2016


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.   



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.MappingExceptionMapp
> 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.MappingExceptionMapp
> 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(Abst
> ractB
> ackendResource.java:65) [restapi-jaxrs.jar:] at 
> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.map(Abst
> ractB
> ackendResource.java:61) [restapi-jaxrs.jar:] at 
> org.ovirt.engine.api.restapi.resource.BackendVmsResource.mapCollection
> (Back
> endVmsResource.java:570) [restapi-jaxrs.jar:] at 
> org.ovirt.engine.api.restapi.resource.BackendVmsResource.list(BackendV
> 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(DelegatingMethodAccess
> 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(ResourceM
> ethod
> Invoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] at 
> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.
> java:250) [resteasy-jaxrs-3.0.10.Final.jar:] at 
> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.
> java:237) [resteasy-jaxrs-3.0.10.Final.jar:] at 
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.
> java:356) [resteasy-jaxrs-3.0.10.Final.jar:] at 
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.
> 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.servic
> e(Htt
> pServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:] at 
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servic
> 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(ServletHandl
> 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(CurrentF
> ilter
> .java:66) [interface-common-jaxrs.jar:] at 
> org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentF
> ilter
> .java:48) [interface-common-jaxrs.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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:60)
> [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(EnforceAu
> thFil
> ter.java:39) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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.jav
> a:75)
> [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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(Negotiati
> onFil
> ter.java:113) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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:60)
> [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(Ses
> sionV
> alidationFilter.java:77) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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.EngineSessionTokenAuthenticationFilt
> er.do
> Filter(EngineSessionTokenAuthenticationFilter.java:31) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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.doFil
> ter(R
> estApiSessionValidationFilter.java:35) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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(CSR
> FProt
> ectionFilter.java:111) [interface-common-jaxrs.jar:] at 
> org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(CSR
> FProt
> ectionFilter.java:102) [interface-common-jaxrs.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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(CORSSu
> pport
> Filter.java:183) [interface-common-jaxrs.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [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(FilterHandler
> .java
> :85) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handl
> 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.SecurityContextAssociationHand
> ler.h
> andleRequest(SecurityContextAssociationHandler.java:78) at 
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHa
> ndler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler
> .hand
> leRequest(SSLInformationAssociationHandler.java:131)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler
> .hand
> leRequest(ServletAuthenticationCallHandler.java:57)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHa
> ndler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.security.handlers.AuthenticationConstraintHandler.handleRe
> quest
> (AuthenticationConstraintHandler.java:51)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleReq
> uest(
> AbstractConfidentialityHandler.java:46)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraint
> Handl
> er.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler
> .hand
> leRequest(ServletSecurityConstraintHandler.java:56)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRe
> quest
> (AuthenticationMechanismsHandler.java:58)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandle
> r.han
> dleRequest(CachedAuthenticatedSessionHandler.java:70)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.security.handlers.SecurityInitialHandler.handleRequest(Sec
> urity
> InitialHandler.java:76) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHa
> ndler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.hand
> leReq
> uest(JACCContextIdHandler.java:61) at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHa
> ndler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHa
> ndler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(
> Servl
> etInitialHandler.java:261) 
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(Ser
> vletI
> nitialHandler.java:248) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] 
> at 
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletI
> nitia
> lHandler.java:77) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at 
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(Ser
> 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(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(DelegatingMethodAccess
> 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.fromKernelVersionStri
> 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




More information about the Users mailing list