Bug 674031

Summary: iscsiadm overrides existing entries without any indication
Product: Red Hat Enterprise Linux 6 Reporter: Cyril Plisko <cplisko>
Component: iscsi-initiator-utilsAssignee: Chris Leech <cleech>
Status: CLOSED WONTFIX QA Contact: Storage QE <storage-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0CC: coughlan, fge, mchristi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 10:25:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 767187    

Description Cyril Plisko 2011-01-31 11:40:06 UTC
Some version context first:

# rpm -q iscsi-initiator-utils
iscsi-initiator-utils-6.2.0.872-10.el6.x86_64

Description of problem:

While playing with iscsiadm in the vdsm (rhev) environment
we discovered that it is too easy to damage/destroy your existing
configuration without any notification from iscsiadm.

Here is the example:

Create new iface and assign an initiatorname to it:

[root@nari10 ut]# iscsiadm -m iface -o new -I i1
New interface i1 added
[root@nari10 ut]# iscsiadm -m iface -o update -I i1 -n iface.initiatorname -v iqn.1994-05.com.redhat:01234567
i1 updated.

Make sure it is ok:

[root@nari10 ut]# iscsiadm -m iface
default tcp,<empty>,<empty>,<empty>,<empty>
iser iser,<empty>,<empty>,<empty>,<empty>
i1 tcp,<empty>,<empty>,<empty>,iqn.1994-05.com.redhat:01234567

Now, say, by mistake I am trying to create the iface with the same name again:
[root@nari10 ut]# iscsiadm -m iface -o new -I i1
New interface i1 added

iscsiadm happily does so and removes the original configuration:

[root@nari10 ut]# iscsiadm -m iface
default tcp,<empty>,<empty>,<empty>,<empty>
iser iser,<empty>,<empty>,<empty>,<empty>
i1 tcp,<empty>,<empty>,<empty>,<empty>


There is neither error code, nor other indication that destructive
action just happened. There is also no safety knob to tell iscsiadm
to avoid creating a new entry when there is one already (with the
same name).

While it may be quite ok for casual CLI use, this is hard to cope
with if iscsiadm is used non-interactively from some other utilities.
In such case some form of feedback (exit code) or CLI option is needed
in order to reliably call iscsiadm.


P.S. while this issue uses iface as an example, the issue itself
is not limited to the iface objects definitions, but rather is more general.

Comment 2 Mike Christie 2011-02-01 00:05:37 UTC
We can add some checks and messages. I am not sure if it will make 6.1. The beta cut off is Fri and I do not have time to do this by then. 6.2 will be fine.

One question. When you do discovery iscsiadm will read iscsid.conf and use those for the default record settings that get stored for each portal found in /var/lib/iscsi/nodes. If you do discocvery again then iscsiadmm will default to overwriting what is there iscsid.conf values. You can pass in the -o new/delete/update to control this behavior.

This default behavior is known and people use it to reset the settings. I am not sure if I can change this behavior in the middle of a RHEL release.

Comment 3 RHEL Program Management 2011-04-04 02:09:17 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2012-05-03 05:20:55 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 8 Jan Kurik 2017-12-06 10:25:28 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/