This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1005773 - NPE when attaching an existing iscsi storage connection to a storage domain
NPE when attaching an existing iscsi storage connection to a storage domain
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Daniel Erez
Elena
storage
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-09 07:43 EDT by Katarzyna Jachim
Modified: 2016-02-10 15:12 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-23 09:19:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
engine.log + server.log (161.94 KB, application/x-compressed-tar)
2013-09-09 07:43 EDT, Katarzyna Jachim
no flags Details

  None (edit)
Description Katarzyna Jachim 2013-09-09 07:43:20 EDT
Created attachment 795586 [details]
engine.log + server.log

Description of problem:
I have a storage domain and a storage connection. I try to attach the storage connection to the storage domain using following REST API call:

https://kj-rh33.rhev.lab.eng.brq.redhat.com/api/storagedomains/6c4915f7-dfcb-4f41-b43e-744c45ef8206

<storage_domain id="6c4915f7-dfcb-4f41-b43e-744c45ef8206">
    <storage id="b31edb88-2d62-4f21-85ca-5f36e917fa60"/>
</storage_domain>

It fails with null pointer exception in server.log:
2013-09-09 11:30:00,665 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/api].[org.ovirt.engine.api.restapi.BackendApplication]] (ajp-/127.0.0.1:8702-6) JBWEB000236: Servlet.service() for servlet org.ovirt.engine.api.restapi.BackendApplication threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
        at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:365) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
...

I also tried following XML body:

<storage_domain id="6c4915f7-dfcb-4f41-b43e-744c45ef8206">
    <storage_connection id="b31edb88-2d62-4f21-85ca-5f36e917fa60"/>
</storage_domain>

the response was the same

Version-Release number of selected component (if applicable): is13


How reproducible: 100%


Steps to Reproduce:
1. add an iscsi storage domain
2. add an iscsi connection
3. try to attach the connection to the storage domain

Actual results: 
action fails with null pointer exception in server.log

Expected results:
action should succeed

Additional info:
Comment 1 Daniel Erez 2013-09-23 08:42:13 EDT
Attaching a connection to a storage domain is done through storageconnections resource. I.e.:

POST /api/storagedomains/{storage_id}/storageconnections
  <storage_connection id="{connection_id}">
  </storage_connection>

Katarzyna, can you please try the described scenario again using this above api?

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