Bug 1006449 - If you try to create a storage connection with empty port, then it is set to 0
If you try to create a storage connection with empty port, then it is set to 0
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-core (Show other bugs)
3.3
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.5.0
Assigned To: Allon Mureinik
Elad
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-10 11:56 EDT by Katarzyna Jachim
Modified: 2016-02-10 13:54 EST (History)
13 users (show)

See Also:
Fixed In Version: ovirt-3.5.0-alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-17 08:28:05 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)
test logs (vdsm, engine, server etc.) (3.67 MB, application/x-bzip2)
2013-09-10 11:56 EDT, Katarzyna Jachim
no flags Details


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

  None (edit)
Description Katarzyna Jachim 2013-09-10 11:56:41 EDT
Created attachment 796066 [details]
test logs (vdsm, engine, server etc.)

Description of problem:
<port> tag is required when creating an iscsi storage connection. However, when you try the following call:
<storage_connection>
    <target>iqn.1992-04.com.emc:cx.ckm00121000438.b7</target>
    <type>iscsi</type>
    <port></port>
    <address>10.35.160.107</address>
</storage_connection>

it succeeds and the created connection has port = 0:

<storage_connections>
    <storage_connection href="/api/storageconnections/726a17f2-67c2-41a0-9fbc-9fed23a70271" id="726a17f2-67c2-41a0-9fbc-9fed23a70271">
        <address>10.35.160.107</address>
        <type>iscsi</type>
        <port>0</port>
        <target>iqn.1992-04.com.emc:cx.ckm00121000438.b7</target>
    </storage_connection>
</storage_connections>

Also, if you try to change existing connection and specified empty tag <port>, it will be set to 0.

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


How reproducible: 100%, automated tests:
http://jenkins.qa.lab.tlv.redhat.com:8080/view/Storage/view/3.3/job/3.3-storage_storage_connections_iscsi-iscsi-rest/54/


Steps to Reproduce:
1. try to create an iscsi storage connection and specify empty <port> tag

Actual results: connection is created with port = 0


Expected results: the operation should fail with appropriate error message
Comment 3 Juan Hernández 2014-02-25 10:08:38 EST
Allon, can you merge this change so that Ravi can backport it to 3.4? If not please retarget to 3.4.1 or 3.5.
Comment 4 Allon Mureinik 2014-02-27 04:57:00 EST
(In reply to Juan Hernández from comment #3)
> Allon, can you merge this change so that Ravi can backport it to 3.4? If not
> please retarget to 3.4.1 or 3.5.
I merged it upstream. Considering the timing in 3.4's lifecycle and the severity of this issue, I pushed it out to 3.5.
Comment 5 Elad 2014-07-08 06:42:14 EDT
Tried to create a storage connection with no value under port parameter and it failed with the following error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[Invalid value for port, should be an integer greater than 0.]</detail>
</fault>


Verified using ovirt-engine-3.5-beta
ovirt-engine-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch
ovirt-engine-restapi-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch
Comment 6 Sandro Bonazzola 2014-10-17 08:28:05 EDT
oVirt 3.5 has been released and should include the fix for this issue.

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