Created attachment 1520544 [details] server and engine logs Description of problem: Detach a managed storage domain via RESTAPI fails with 500 internel server error via REST response . In server.log on the engine you see the following NPE: 2019-01-14 13:52:30,866+02 ERROR [io.undertow.request] (default task-62) UT005023: Exception handling request to /ovirt-engine/api/v4/datacenters/4361c2c0-9d71-4d0f-9cec-2fcee3a9812f/storagedomains/1554617b-a1f7-4a7e-a650-f7a1d251e958: java.lang.RuntimeException: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:245) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.api.restapi.invocation.VersionFilter.doFilter(VersionFilter.java:178) [restapi-jaxrs.jar:] at org.ovirt.engine.api.restapi.invocation.VersionFilter.doFilter(VersionFilter.java:98) [restapi-jaxrs.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.api.restapi.invocation.CurrentFilter.doFilter(CurrentFilter.java:117) [restapi-jaxrs.jar:] at org.ovirt.engine.api.restapi.invocation.CurrentFilter.doFilter(CurrentFilter.java:72) [restapi-jaxrs.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.doFilter(RestApiSessionMgmtFilter.java:78) [aaa.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.core.aaa.filters.EnforceAuthFilter.doFilter(EnforceAuthFilter.java:42) [aaa.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.core.aaa.filters.SsoRestApiNegotiationFilter.doFilter(SsoRestApiNegotiationFilter.java:84) [aaa.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.core.aaa.filters.SsoRestApiAuthFilter.doFilter(SsoRestApiAuthFilter.java:47) [aaa.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.core.aaa.filters.SessionValidationFilter.doFilter(SessionValidationFilter.java:59) [aaa.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.core.aaa.filters.RestApiSessionValidationFilter.doFilter(RestApiSessionValidationFilter.java:35) [aaa.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.api.restapi.security.CSRFProtectionFilter.doFilter(CSRFProtectionFilter.java:111) [restapi-jaxrs.jar:] at org.ovirt.engine.api.restapi.security.CSRFProtectionFilter.doFilter(CSRFProtectionFilter.java:102) [restapi-jaxrs.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at org.ovirt.engine.core.utils.servlet.CORSSupportFilter.doFilter(CORSSupportFilter.java:283) [utils.jar:] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.13.Final.jar:2.0.13.Final] Version-Release number of selected component (if applicable): Software Version:4.3.0-0.4.master.20190106162157.gitd96a412.el7 How reproducible: 100% Steps to Reproduce: 1.Add managed(cinderlib) storage domain to DC 2.After SD is active move SD to maintanance. 3.VIA RESTAPI(!!) detach managed storage domain. Actual results: detach fails with 500 internel server error via REST response . In server.log on the engine you see the following NPE: 2019-01-14 13:52:30,866+02 ERROR [io.undertow.request] (default task-62) UT005023: Exception handling request to /ovirt-engine/api/v4/datacenters/4361c2c0-9d71-4d0f-9cec-2fcee3a9812f/storagedomains/1554617b-a1f7-4a7e-a650-f7a1d251e958: java.lang.RuntimeException: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException Expected results: Additional info: REST request used : request method : DELETE Headers: Content-type: application/xml Basic authorization with user/password URL: https://storage-ge-08.scl.lab.tlv.redhat.com/ovirt-engine/api/datacenters/4361c2c0-9d71-4d0f-9cec-2fcee3a9812f/storagedomains/0b9df0db-f631-4117-a4d6-a9c8168f1546 No body. REST response: Status : 500 internal Server error <html> <head> <title>Error</title> </head> <body>Internal Server Error</body> </html>
Just to clarify, no issue see detaching the same SD via webadmin
Created attachment 1520545 [details] RestAPI resquest
Verified on 4.3.0.2-0.1.el7
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019. Since the problem described in this bug report should be resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.