Bug 1006449

Summary: If you try to create a storage connection with empty port, then it is set to 0
Product: [Retired] oVirt Reporter: Katarzyna Jachim <kjachim>
Component: ovirt-engine-coreAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3CC: acanan, amureini, bazulay, gklein, iheim, juan.hernandez, ncredi, oramraz, rbalakri, Rhev-m-bugs, rnori, scohen, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-3.5.0-alpha1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:28:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test logs (vdsm, engine, server etc.) none

Description Katarzyna Jachim 2013-09-10 15:56:41 UTC
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 15:08:38 UTC
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 09:57:00 UTC
(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 10:42:14 UTC
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 12:28:05 UTC
oVirt 3.5 has been released and should include the fix for this issue.