Bug 1665922 - [CinderLib] - RESTAPI- Detaching managed storage fails with Internal Server Error - ERROR [io.undertow.request] (default task-62) UT005023: Exception handling request spi.UnhandledException: java.lang.NullPointerException
Summary: [CinderLib] - RESTAPI- Detaching managed storage fails with Internal Server E...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.3.0
: ---
Assignee: Eyal Shenitzky
QA Contact: Avihai
URL:
Whiteboard:
Depends On:
Blocks: 1539837
TreeView+ depends on / blocked
 
Reported: 2019-01-14 12:54 UTC by Avihai
Modified: 2019-02-13 07:43 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-4.3.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-13 07:43:06 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.3+


Attachments (Terms of Use)
server and engine logs (269.84 KB, application/gzip)
2019-01-14 12:54 UTC, Avihai
no flags Details
RestAPI resquest (129.31 KB, image/png)
2019-01-14 12:59 UTC, Avihai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 97147 0 master MERGED restapi: add missing MANAGED_BLOCK_STORAGE type to storage mapper 2019-01-22 07:33:02 UTC

Description Avihai 2019-01-14 12:54:40 UTC
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>

Comment 1 Avihai 2019-01-14 12:58:04 UTC
Just to clarify, no issue see detaching the same SD via webadmin

Comment 2 Avihai 2019-01-14 12:59:03 UTC
Created attachment 1520545 [details]
RestAPI resquest

Comment 3 Avihai 2019-01-31 14:56:50 UTC
Verified on 4.3.0.2-0.1.el7

Comment 4 Sandro Bonazzola 2019-02-13 07:43:06 UTC
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.


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