Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1322923 - java.lang.IllegalArgumentException: No type specified for option: 'encrypt_options' in /api/capabilities
java.lang.IllegalArgumentException: No type specified for option: 'encrypt_op...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.4
Unspecified Unspecified
unspecified Severity urgent
: ovirt-4.0.0-alpha
: 4.0.0
Assigned To: Juan Hernández
Gonza
: ZStream
Depends On:
Blocks: 1323450
  Show dependency treegraph
 
Reported: 2016-03-31 12:45 EDT by Itamar Heim
Modified: 2016-08-23 16:34 EDT (History)
10 users (show)

See Also:
Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1323450 (view as bug list)
Environment:
Last Closed: 2016-08-23 16:34:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 55571 master MERGED restapi: Tolerate invalid fencing options 2016-04-03 05:33 EDT
oVirt gerrit 55572 ovirt-engine-3.6 MERGED restapi: Tolerate invalid fencing options 2016-04-03 07:04 EDT
oVirt gerrit 55602 ovirt-engine-3.6.5 MERGED restapi: Tolerate invalid fencing options 2016-04-04 04:57 EDT
Red Hat Product Errata RHEA-2016:1743 normal SHIPPED_LIVE Red Hat Virtualization Manager 4.0 GA Enhancement (ovirt-engine) 2016-09-02 17:54:01 EDT

  None (edit)
Description Itamar Heim 2016-03-31 12:45:39 EDT
using RHEV in Version 3.6.4-0.1.el6
trying to fetch /ovirt-engine/api/capabilities i get:

JBWEB000065: HTTP Status 500 - java.lang.IllegalArgumentException: No type specified for option: 'encrypt_options'

JBWEB000309: type JBWEB000066: Exception report

JBWEB000068: message java.lang.IllegalArgumentException: No type specified for option: 'encrypt_options'

JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.

JBWEB000070: exception

org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalArgumentException: No type specified for option: 'encrypt_options'
	org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:367)
	org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:235)
	org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:211)
	org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:576)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:543)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:128)
	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)
	org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter.java:66)
	org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter.java:48)
	org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.doFilter(RestApiSessionMgmtFilter.java:81)
	org.ovirt.engine.core.aaa.filters.EnforceAuthFilter.doFilter(EnforceAuthFilter.java:39)
	org.ovirt.engine.core.aaa.filters.LoginFilter.doFilter(LoginFilter.java:75)
	org.ovirt.engine.core.aaa.filters.NegotiationFilter.doFilter(NegotiationFilter.java:113)
	org.ovirt.engine.core.aaa.filters.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:90)
	org.ovirt.engine.core.aaa.filters.SessionValidationFilter.doFilter(SessionValidationFilter.java:77)
	org.ovirt.engine.core.aaa.filters.EngineSessionTokenAuthenticationFilter.doFilter(EngineSessionTokenAuthenticationFilter.java:31)
	org.ovirt.engine.core.aaa.filters.RestApiSessionValidationFilter.doFilter(RestApiSessionValidationFilter.java:35)
	org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(CSRFProtectionFilter.java:111)
	org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(CSRFProtectionFilter.java:102)
	org.ovirt.engine.api.common.security.CORSSupportFilter.doFilter(CORSSupportFilter.java:183)

JBWEB000071: root cause

java.lang.IllegalArgumentException: No type specified for option: 'encrypt_options'
	org.ovirt.engine.api.restapi.util.FenceOptionsParser.parseOption(FenceOptionsParser.java:105)
	org.ovirt.engine.api.restapi.util.FenceOptionsParser.parseOptions(FenceOptionsParser.java:79)
	org.ovirt.engine.api.restapi.util.FenceOptionsParser.parseAgent(FenceOptionsParser.java:68)
	org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse(FenceOptionsParser.java:24)
	org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.getPowerManagers(BackendCapabilitiesResource.java:647)
	org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.generateVersionCaps(BackendCapabilitiesResource.java:245)
	org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.list(BackendCapabilitiesResource.java:219)
	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:168)
	org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
	org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
	org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
	org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:561)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:543)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:128)
	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)
	org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter.java:66)
	org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter.java:48)
	org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.doFilter(RestApiSessionMgmtFilter.java:81)
	org.ovirt.engine.core.aaa.filters.EnforceAuthFilter.doFilter(EnforceAuthFilter.java:39)
	org.ovirt.engine.core.aaa.filters.LoginFilter.doFilter(LoginFilter.java:75)
	org.ovirt.engine.core.aaa.filters.NegotiationFilter.doFilter(NegotiationFilter.java:113)
	org.ovirt.engine.core.aaa.filters.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:90)
	org.ovirt.engine.core.aaa.filters.SessionValidationFilter.doFilter(SessionValidationFilter.java:77)
	org.ovirt.engine.core.aaa.filters.EngineSessionTokenAuthenticationFilter.doFilter(EngineSessionTokenAuthenticationFilter.java:31)
	org.ovirt.engine.core.aaa.filters.RestApiSessionValidationFilter.doFilter(RestApiSessionValidationFilter.java:35)
	org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(CSRFProtectionFilter.java:111)
	org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(CSRFProtectionFilter.java:102)
	org.ovirt.engine.api.common.security.CORSSupportFilter.doFilter(CORSSupportFilter.java:183)
Comment 1 Juan Hernández 2016-04-01 05:51:52 EDT
The only way this can happen is if the "encrypt_options=bool" pair is missing from the VdsFenceOptionTypes configuration value. Please check if this is the case, with the following SQL query:

  select * from vdc_options where option_name='VdsFenceOptionTypes'

The result should be the following:

  encrypt_options=bool,secure=bool,port=int,slot=int

If it isn't, then update the database:

  update vdc_options set option_value='secure=bool,port=int,slot=int' where option_name='VdsFenceOptionTypes'

Then restart the engine and it should work correctly.

In theory this value is automatically added during updates:

  https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-3.6/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql#L601

Any chances that this has been manually modified after the upgrade?

Anyhow, a missing parameter like this should not cause a complete failure of the capabilities resource, we will fix that.
Comment 3 Juan Hernández 2016-04-01 07:00:15 EDT
Oved, please request the 3.6.z flag.
Comment 4 Juan Hernández 2016-04-01 08:01:31 EDT
The SQL statement to update the database in comment 1 is wrong, it should obviously include the missing pair:

  update vdc_options set option_value='encrypt_options=bool,secure=bool,port=int,slot=int' where option_name='VdsFenceOptionTypes'
Comment 6 Juan Hernández 2016-04-04 05:05:18 EDT
Note that in order to test and verify this you will need to force an error in the configuration. To do so manually perform the following update in the database:

  update vdc_options set option_value='secure=bool,port=int,slot=int' where option_name='VdsFenceOptionTypes'

Then restart the engine, and once it is running again request the API capabilities resource:

  GET /ovirt-engine/api/capabilities

That used to fail but should succeed now, and the following error message should appear in engine.log:

  ERROR: No type specified for fencing option "encrypt_options".
Comment 7 Gonza 2016-06-24 04:54:56 EDT
Verified with:
rhevm-4.0.0.6-0.1.el7ev.noarch
Comment 9 errata-xmlrpc 2016-08-23 16:34:06 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-1743.html

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