Bug 1259266 - engine_api.hosts.add fails if called passing reboot_after_installation optional parameter
Summary: engine_api.hosts.add fails if called passing reboot_after_installation option...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: General
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.0-alpha
: 2.0.0
Assignee: Simone Tiraboschi
QA Contact: Artyom
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-02 10:23 UTC by Simone Tiraboschi
Modified: 2016-07-05 08:03 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
engine_api.hosts.add doesn't support anymore the reboot_after_installation parameter defaulting to false.
Clone Of:
Environment:
Last Closed: 2016-07-05 08:03:05 UTC
oVirt Team: Integration
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
sbonazzo: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 45656 0 master MERGED packaging: setup: removing reboot_after_installation Never

Description Simone Tiraboschi 2015-09-02 10:23:40 UTC
Description of problem:
engine_api.hosts.add fails if called passing reboot_after_installation optional parameter

Version-Release number of selected component (if applicable):
ovirt-engine-restapi.noarch      4.0.0-0.0.master.20150821161501.git8394dea.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. call engine_api.hosts.add passing also reboot_after_installation=False
2.
3.

Actual results:
2015-09-02 09:38:59,343 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-5) [] Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: User admin@internal logged in.
2015-09-02 09:40:07,328 ERROR [org.ovirt.engine.api.restapi.resource.validation.IOExceptionMapper] (default task-9) [] IO exception while processing "POST" request for path "/hosts"
2015-09-02 09:40:07,330 ERROR [org.ovirt.engine.api.restapi.resource.validation.IOExceptionMapper] (default task-9) [] Exception: java.io.IOException: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"reboot_after_installation"). Expected elements are <{}port>,<{}summary>,<{}external_host_provider>,<{}storage_connection_extensions>,<{}hooks>,<{}update_available>,<{}link>,<{}max_scheduling_memory>,<{}hardware_information>,<{}spm>,<{}auto_numa_status>,<{}type>,<{}creation_status>,<{}live_snapshot_support>,<{}ssh>,<{}statistics>,<{}version>,<{}selinux>,<{}kdump_status>,<{}iscsi>,<{}certificate>,<{}description>,<{}name>,<{}storage_manager>,<{}ksm>,<{}os>,<{}protocol>,<{}status>,<{}libvirt_version>,<{}cpu>,<{}override_iptables>,<{}device_passthrough>,<{}display>,<{}memory>,<{}katello_errata>,<{}root_password>,<{}power_management>,<{}numa_supported>,<{}address>,<{}hosted_engine>,<{}cluster>,<{}comment>,<{}external_status>,<{}actions>,<{}transparent_hugepages>
        at org.ovirt.engine.api.restapi.xml.JAXBProvider.readFrom(JAXBProvider.java:190) [restapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.xml.JAXBProvider.readFrom(JAXBProvider.java:152) [restapi-jaxrs.jar:]
        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:59) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.interception.ServerReaderInterceptorContext.readFrom(ServerReaderInterceptorContext.java:62) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:51) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(DigitalVerificationInterceptor.java:32) [resteasy-crypto-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:150) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:89) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:112) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.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.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.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(ServletHandler.java:86) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet.jar:1.1.5.Final]
        at org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter.java:66) [interface-common-jaxrs.jar:]
        at org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter.java:48) [interface-common-jaxrs.jar:]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet.jar:1.1.5.Final]
        at org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.doFilter(RestApiSessionMgmtFilter.java:81) [aaa.jar:]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet.jar:1.1.5.Final]
        at org.ovirt.engine.core.aaa.filters.EnforceAuthFilter.doFilter(EnforceAuthFilter.java:39) [aaa.jar:]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet.jar:1.1.5.Final]
        at org.ovirt.engine.core.aaa.filters.LoginFilter.doFilter(LoginFilter.java:75) [aaa.jar:]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet.jar:1.1.5.Final]
        at org.ovirt.engine.core.aaa.filters.NegotiationFilter.doFilter(NegotiationFilter.java:113) [aaa.jar:]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet.jar:1.1.5.Final]
        at org.ovirt.engine.core.aaa.filters.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:90) [aaa.jar:]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet.jar:1.1.5.Final]
        at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core.jar:1.1.5.Final]
        at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core.jar:1.1.5.Final]
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core.jar:1.1.5.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core.jar:1.1.5.Final]
        at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core.jar:1.1.5.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:248) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:77) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:167) [undertow-servlet.jar:1.1.5.Final]
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) [undertow-core.jar:1.1.5.Final]
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:766) [undertow-core.jar:1.1.5.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_85]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_85]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_85]
Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"reboot_after_installation"). Expected elements are <{}port>,<{}summary>,<{}external_host_provider>,<{}storage_connection_extensions>,<{}hooks>,<{}update_available>,<{}link>,<{}max_scheduling_memory>,<{}hardware_information>,<{}spm>,<{}auto_numa_status>,<{}type>,<{}creation_status>,<{}live_snapshot_support>,<{}ssh>,<{}statistics>,<{}version>,<{}selinux>,<{}kdump_status>,<{}iscsi>,<{}certificate>,<{}description>,<{}name>,<{}storage_manager>,<{}ksm>,<{}os>,<{}protocol>,<{}status>,<{}libvirt_version>,<{}cpu>,<{}override_iptables>,<{}device_passthrough>,<{}display>,<{}memory>,<{}katello_errata>,<{}root_password>,<{}power_management>,<{}numa_supported>,<{}address>,<{}hosted_engine>,<{}cluster>,<{}comment>,<{}external_status>,<{}actions>,<{}transparent_hugepages>
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:258)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:253)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:120)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)
        at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:262)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:498)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
        at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
        at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246)
        at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:415)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:386)
        at org.ovirt.engine.api.restapi.xml.JAXBProvider.readFrom(JAXBProvider.java:177) [restapi-jaxrs.jar:]
        ... 85 more


Expected results:
It works as before

Additional info:
hosted-engine-setup is failing

Comment 1 Juan Hernández 2015-09-02 11:37:08 UTC
The "reboot_after_installation" element was removed by the following change:

  host-deploy: remove obsolete modes
  https://gerrit.ovirt.org/44450

This is a backwards compatibility breaking change, but this kind of changes are allowed in 4.0, so this isn't a bug. You need to change the hosted engine setup so that it doesn't use this parameter.

Comment 2 Simone Tiraboschi 2015-09-02 12:39:12 UTC
So reopening and moving to ovirt-hosted-engine-setup to have the parameter removed.
Juan, what will be the reboot behavior without that parameter? on hosted engine we have to avoid host reboot cause the setup is still running.

We need also to explicitly add a conflict between ovirt-hosted-engine-setup from 3.6 with appliance from master.

Comment 3 Juan Hernández 2015-09-02 12:50:28 UTC
My understanding is that the default now (in 4.x) is to not reboot the host.

Comment 4 Sandro Bonazzola 2015-09-02 14:25:18 UTC
Simone, please check all-in-one as well, I think it will be affected too.

Comment 5 Simone Tiraboschi 2015-09-02 14:48:39 UTC
(In reply to Sandro Bonazzola from comment #4)
> Simone, please check all-in-one as well, I think it will be affected too.

It wasn't using it

Comment 6 Red Hat Bugzilla Rules Engine 2015-10-19 11:03:39 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 7 Artyom 2016-04-07 12:26:46 UTC
Verified on ovirt-hosted-engine-setup-2.0.0-0.0.master.20160325145108.gita9a3495.el7.centos.noarch

Comment 8 Sandro Bonazzola 2016-07-05 08:03:05 UTC
oVirt 4.0.0 has been released, closing current release.


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