Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1005296 - Empty error message when try to add an iscsi connection with empty address
Summary: Empty error message when try to add an iscsi connection with empty address
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.4.0
Assignee: Ori Liel
QA Contact: Meital Bourvine
URL:
Whiteboard: storage
Depends On:
Blocks: rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2013-09-06 15:37 UTC by Katarzyna Jachim
Modified: 2016-02-10 17:50 UTC (History)
13 users (show)

Fixed In Version: av2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)
engine.log + server.log (deleted)
2013-09-06 15:37 UTC, Katarzyna Jachim
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 23999 None None None Never
oVirt gerrit 24545 None None None Never

Description Katarzyna Jachim 2013-09-06 15:37:32 UTC
Created attachment 794825 [details]
engine.log + server.log

Description of problem:

If you try to add an iscsi storage connection with an empty address, the error message is empty.

POST:
<storage_connection>
   <address></address>
   <type>iscsi</type>
   <port>3260</port>
   <target>iqn.2013-09.com.example:testing_kj</target>
</storage_connection>

response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[]</detail>
</fault>


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


How reproducible:


Steps to Reproduce:
1. try to add an iscsi storage domain with empty address

Actual results: empty error message


Expected results: error message should contain information what was the problem


Additional info:

from engine.log:

2013-09-06 15:22:05,212 INFO  [org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] (ajp-/127.0.0.1:8702-8) Lock Acquired to object EngineLock [exclusiveLocks= key: ;iqn.2013-09.com.example:testing_kj;3260;null value: STORAGE_CONNECTION
, sharedLocks= ]
2013-09-06 15:22:05,212 WARN  [org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] (ajp-/127.0.0.1:8702-8) CanDoAction of action AddStorageServerConnection failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__STORAGE__CONNECTION,$fieldName address,VALIDATION_STORAGE_CONNECTION_EMPTY_CONNECTION
2013-09-06 15:22:05,212 INFO  [org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] (ajp-/127.0.0.1:8702-8) Lock freed to object EngineLock [exclusiveLocks= key: ;iqn.2013-09.com.example:testing_kj;3260;null value: STORAGE_CONNECTION
, sharedLocks= ]
2013-09-06 15:22:05,244 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-8) Operation Failed: []


backtrace from server.log:

2013-09-06 15:22:05,245 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (ajp-/127.0.0.1:8702-8) failed to execute: org.ovirt.engine.api.re
stapi.resource.BaseBackendResource$WebFaultException
        at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:233) [restapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:208) [restapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource.doCreateEntity(AbstractBackendCollectionResource.java:248) [r
estapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource.performCreate(AbstractBackendCollectionResource.java:119) [re
stapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource.performCreate(AbstractBackendCollectionResource.java:109) [re
stapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource.performCreate(AbstractBackendCollectionResource.java:128) [re
stapi-jaxrs.jar:]
        at org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionsResource.add(BackendStorageServerConnectionsResource.java:81) [restapi-jaxrs.jar:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_11-icedtea]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_11-icedtea]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_11-icedtea]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_11-icedtea]
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs.jar:2.3.6.Final-redhat-1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec.jar:1.0.2.Final-redhat-1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web.jar:7.2.0.Final-redhat-8]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:465) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420) [jbossweb.jar:7.2.0.Final-redhat-1]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb.jar:7.2.0.Final-redhat-1]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11-icedtea]

Comment 1 Katarzyna Jachim 2013-09-06 15:40:15 UTC
The same happens if we try to change address to an empty string.

Comment 4 Ori Liel 2014-02-03 13:26:24 UTC
This issue is part of a more general issue of empty string validations in the API. 

Patch posted here: 

  http://gerrit.ovirt.org/#/c/23999/1


As for update scenario, I updated supplying an empty address and got meaningful error message, so I don't think anything needs to be done there. 

<fault>
    <reason>Operation Failed</reason>
    <detail>[Mount path is illegal, please use [IP:/path or FQDN:/path] convention.]</detail>
</fault>

Comment 7 Meital Bourvine 2014-03-05 12:14:23 UTC
Verified on av2:

https://<engine>/api/storageconnections

<storage_connection>
   <address></address>
   <type>iscsi</type>
   <port>3260</port>
   <target>iqn.2013-09.com.example:testing_kj</target>
</storage_connection>



<fault>
<reason>Incomplete parameters</reason>
<detail>StorageConnection [address] required for add</detail>
</fault>

Comment 8 Itamar Heim 2014-06-12 14:10:55 UTC
Closing as part of 3.4.0


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