Description of problem: * Similar issue was fixed in bug #1340164 * When trying to delete a storage domain using the REST API, the return code is 500 Internal Server Error and the response body is: <html> <head> <title>Error</title> </head> <body>Internal Server Error</body> </html> The call is - DELETE ovirt-engine/api/storagedomains/3c0a32b7-0ec1-4dd5-a1e4-54156a4753b4 body: <storage_domain> <host id="724a18e4-bd69-42d9-a547-9f3aece0d0f4"/> <format>false</format> </storage_domain> In rsdl, the parameter set is: <parameters_set> <parameter required="false" type="xs:boolean" context="matrix"> <name>force</name> <value>true|false</value> </parameter> <parameter required="true" type="xs:string" context="matrix"> <name>destroy</name> <value>the id or name of the host</value> </parameter> <parameter required="false" type="xs:boolean" context="matrix"> <name>async</name> <value>true|false</value> </parameter> </parameters_set> So it seems there is a problem here as well - the parameter name is 'destroy' instead of host No logs attached because the request don't even get's to the engine Version-Release number of selected component (if applicable): rhevm-4.0.1.1-0.1.el7ev.noarch How reproducible: 100% Steps to Reproduce: - Have a detached storage domain 1. Send DELETE request to ovirt-engine/api/storagedomains/<sd_id> with body: <storage_domain> <host id="724a18e4-bd69-42d9-a547-9f3aece0d0f4"/> <format>false</format> </storage_domain> 2. 3. Actual results: 500 Internal Server Error and the response body is: <html> <head> <title>Error</title> </head> <body>Internal Server Error</body> </html> Expected results: Additional info:
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Is the call made with version 3 or version 4 of the API?
v3, look at the header of this bug
I can't seem to reproduce this, I try: DELETE http://localhost:8080/ovirt-engine/api/v3/storagedomains/072fbaa1-08f3-4a40-9f34-a5ca22dd1d74 Content-Type: application/xml Body: <storage_domain> <host id="17b817e1-2cce-4c29-a275-0174c53ea211"/> <format>false</format> </storage_domain> And the request reaches the engine just fine. - Could it be that the fix for issue 1340164 that you mentioned, solves this too? the code change seems to be very relevant - An error resulting in 500: Internal Server Error should probably leave a trace in server.log, can you please attach it? Thanks
Ori, This bug introduced after bug #1340164 was fixed. I am able to reproduce this on 3 different environments with the following packages: ovirt-vmconsole-1.0.4-1.el7ev.noarch ovirt-engine-dashboard-1.0.0-20160705git3e1e994.el7ev.x86_64 ovirt-engine-setup-plugin-ovirt-engine-4.0.1.1-0.1.el7ev.noarch ovirt-host-deploy-java-1.5.1-1.el7ev.noarch ovirt-engine-dwh-setup-4.0.1-1.el7ev.noarch ovirt-host-deploy-1.5.1-1.el7ev.noarch ovirt-engine-restapi-4.0.1.1-0.1.el7ev.noarch ovirt-engine-extension-aaa-ldap-setup-1.2.1-1.el7ev.noarch python-ovirt-engine-sdk4-4.0.0-0.1.a3.el7ev.x86_64 ovirt-engine-setup-base-4.0.1.1-0.1.el7ev.noarch ovirt-engine-websocket-proxy-4.0.1.1-0.1.el7ev.noarch ovirt-engine-vmconsole-proxy-helper-4.0.1.1-0.1.el7ev.noarch ovirt-engine-sdk-python-3.6.7.0-1.el7ev.noarch ovirt-engine-extension-aaa-jdbc-1.1.0-1.el7ev.noarch ovirt-engine-lib-4.0.1.1-0.1.el7ev.noarch ovirt-engine-setup-plugin-websocket-proxy-4.0.1.1-0.1.el7ev.noarch ovirt-vmconsole-proxy-1.0.4-1.el7ev.noarch ovirt-engine-backend-4.0.1.1-0.1.el7ev.noarch ovirt-engine-webadmin-portal-4.0.1.1-0.1.el7ev.noarch ovirt-engine-4.0.1.1-0.1.el7ev.noarch ovirt-engine-extension-aaa-misc-1.0.1-2.el7ev.noarch ovirt-iso-uploader-4.0.0-1.el7ev.noarch ovirt-engine-cli-3.6.7.0-1.el7ev.noarch ovirt-engine-dwh-4.0.1-1.el7ev.noarch ovirt-engine-dbscripts-4.0.1.1-0.1.el7ev.noarch ovirt-engine-userportal-4.0.1.1-0.1.el7ev.noarch ovirt-engine-sdk-java-3.6.7.0-1.el7ev.noarch ovirt-log-collector-4.0.0-1.el7ev.noarch ovirt-engine-tools-backup-4.0.1.1-0.1.el7ev.noarch ovirt-engine-setup-plugin-vmconsole-proxy-helper-4.0.1.1-0.1.el7ev.noarch ovirt-engine-extension-aaa-ldap-1.2.1-1.el7ev.noarch ovirt-setup-lib-1.0.2-1.el7ev.noarch ovirt-engine-setup-plugin-ovirt-engine-common-4.0.1.1-0.1.el7ev.noarch ovirt-engine-setup-4.0.1.1-0.1.el7ev.noarch ovirt-engine-tools-4.0.1.1-0.1.el7ev.noarch ovirt-engine-extensions-api-impl-4.0.1.1-0.1.el7ev.noarch ovirt-image-uploader-4.0.0-1.el7ev.noarch
Raz, can you attach the logs as Ori requested?
Created attachment 1182403 [details] server log server.log attached
This is a real and important issue. The relevant error message is the following: Caused by: java.lang.UnsupportedOperationException at org.jboss.resteasy.specimpl.UnmodifiableMultivaluedMap.putSingle(UnmodifiableMultivaluedMap.java:29) [resteasy-jaxrs.jar:3.0.17.Final-redhat-1] at org.ovirt.engine.api.v3.servers.V3StorageDomainServer.remove(V3StorageDomainServer.java:81) [restapi-jaxrs.jar:] In the V3 compatibility layer we modify the map of input parameters. For example, we take the "<format>true</format>" parameter from the body of the V3 response and convert into a "?format=true" query parameter. The version of JBoss that we used to try to reproduce works correctly, but the version used by Raz doesn't work: eap7-wildfly-7.0.1-4.GA_redhat_2.1.ep7.el7.noarch That is probably because a change in the implementation of Resteasy. I'm checking it.
This error is a side effect of the following change in Resteasy: UriInfo.getQueryParameters() should return an immutable map https://issues.jboss.org/browse/RESTEASY-1331 This was introduced in version 3.0.17.Final of Resteasy, which is part of JBoss EAP 7.0.1. We need to modify our code so that it doesn't try to modify these now immutable maps.
4.0.2 backport is needed.
Verified on ovirt-engine-4.0.2.2-0.1.el7ev.noarch. The storage domain deleted successfully from REST API v3