Bug 1005296 - Empty error message when try to add an iscsi connection with empty address
Empty error message when try to add an iscsi connection with empty address
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity low
: ---
: 3.4.0
Assigned To: Ori Liel
Meital Bourvine
storage
:
Depends On:
Blocks: rhev3.4beta 1142926
  Show dependency treegraph
 
Reported: 2013-09-06 11:37 EDT by Katarzyna Jachim
Modified: 2016-02-10 12:50 EST (History)
13 users (show)

See Also:
Fixed In Version: av2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 (837.88 KB, application/x-compressed-tar)
2013-09-06 11:37 EDT, Katarzyna Jachim
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 23999 None None None Never
oVirt gerrit 24545 None None None Never

  None (edit)
Description Katarzyna Jachim 2013-09-06 11:37:32 EDT
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 11:40:15 EDT
The same happens if we try to change address to an empty string.
Comment 4 Ori Liel 2014-02-03 08:26:24 EST
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 07:14:23 EST
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 10:10:55 EDT
Closing as part of 3.4.0

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