Bug 1005284 - It is possible to change an iscsi storage connection and set an empty target
It is possible to change an iscsi storage connection and set an empty target
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 unspecified
: ---
: 3.4.0
Assigned To: Daniel Erez
Meital Bourvine
storage
:
Depends On:
Blocks: rhev3.4beta 1142926
  Show dependency treegraph
 
Reported: 2013-09-06 11:14 EDT by Katarzyna Jachim
Modified: 2016-02-10 12:19 EST (History)
11 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-alpha1
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: ---
amureini: Triaged+


Attachments (Terms of Use)
test logs (vdsm, engine, server etc.) (3.51 MB, application/x-bzip2)
2013-09-06 11:14 EDT, Katarzyna Jachim
no flags Details


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

  None (edit)
Description Katarzyna Jachim 2013-09-06 11:14:35 EDT
Created attachment 794810 [details]
test logs (vdsm, engine, server etc.)

Description of problem:

If you try to add an iscsi storage connection via REST API with empty target, it will fail:

POST request:
<storage_connection>
   <address>10.34.63.202</address>
   <type>iscsi</type>
   <port>3260</port>
   <target></target>
</storage_connection>

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

However, if you create a connection with non-empty target, you can later change the target to empty:

PUT request:
<storage_connection>
   <address>10.34.63.202</address>
   <type>iscsi</type>
   <port>3260</port>
   <target></target>
</storage_connection>

response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storage_connection href="/api/storageconnections/28aeccb1-d72b-4742-bff2-4f9199463873" id="28aeccb1-d72b-4742-bff2-4f9199463873">
    <address>10.34.63.202</address>
    <type>iscsi</type>
    <port>3260</port>
    <target></target>
</storage_connection>


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


How reproducible: 100%


Steps to Reproduce:
1. create an iscsi storage connection
2. try to change target to empty string

Actual results: it is possible to change an iscsi storage connection so that the target is empty


Expected results: the command should fail with the "Target details cannot be empty." error

Additional info:
Attached logs are from this execution: http://jenkins.qa.lab.tlv.redhat.com:8080/view/Storage/view/3.3/job/3.3-storage_storage_connections_iscsi-iscsi-rest/25/testReport/junit/storage_storage_connections.test_manage_storage_connections_iscsi/013-TestCase288986;test_changing_storage_connection_without_target/TestCase288986_test_changing_storage_connection_without_target/

2013-09-04 17:19:24,283 - MainThread - plmanagement.trace - INFO - art.rhevm_api.tests_lib.low_level.storageconnections._prepare_connection_object(kwargs={'lun_target': '', 'type': 'iscsi'})
2013-09-04 17:19:24,285 - MainThread - storageconnections - DEBUG - PUT request content is --  url:/api/storageconnections/c1a89e8c-b220-424b-8b0f-7133b5cc6040 body:<storage_connection>
    <type>iscsi</type>
    <target></target>
</storage_connection>
 
2013-09-04 17:19:24,625 - MainThread - core_api - DEBUG - Request response time: 0.260
2013-09-04 17:19:24,626 - MainThread - storageconnections - DEBUG - Response body for PUT request is: 
<storage_connection href="/api/storageconnections/c1a89e8c-b220-424b-8b0f-7133b5cc6040" id="c1a89e8c-b220-424b-8b0f-7133b5cc6040">
    <address>256.256.256.256</address>
    <type>iscsi</type>
    <port>3260</port>
    <target></target>
</storage_connection>
Comment 1 Sandro Bonazzola 2014-01-14 03:44:41 EST
ovirt 3.4.0 alpha has been released
Comment 2 Meital Bourvine 2014-01-16 08:50:08 EST
Verified on ovirt-3.4.0-alpha1:

request:
Method: PUT
URL: https://10.34.63.25/api/storageconnections/6147014f-e4b9-4a85-bb6d-d08d9a3faed6
Body:
<storage_connection>
<address>10.34.63.202</address>
<type>iscsi</type>
<port>3260</port>
<target></target>
</storage_connection>

Response:
<fault>
<reason>Operation Failed</reason>
<detail>[Target details cannot be empty.]</detail>
</fault>
Comment 3 Itamar Heim 2014-06-12 10:10:57 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.