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
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Daniel Erez
: Triaged
Depends On:
  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:
Last Closed: 2013-09-23 09:19:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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:

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

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-/ 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( [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.handleException( [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException( [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse( [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"/>

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}">

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.