Bug 967952 - tgt-admin assumes that ACL consists only of IPs, while these can actually be just names
tgt-admin assumes that ACL consists only of IPs, while these can actually be ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: scsi-target-utils (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Andy Grover
Bruno Goncalves
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 12:12 EDT by Jaroslav Kortus
Modified: 2015-10-09 09:41 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-09 09:41:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jaroslav Kortus 2013-05-28 12:12:51 EDT
Description of problem:
tgt-admin assumes that ACL consists only of IPs, while these can actually be just names (IQNs).

Version-Release number of selected component (if applicable):
scsi-target-utils-1.0.24-2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. define a target in tgtd.conf with initiator-name
2. observe that with tgt-admin -s there is the name listed in ACL for the target
3. tgt-admin --update ALL -f -c /etc/tgt/targets.conf
4. command 3 exits with 22

Actual results:
exit code 22
error:
tgtadm: this access control rule does not exist
Command:
	tgtadm -C 0 --op unbind --mode target --tid 13 -I CLUSTER2
exited with code: 22.


Expected results:
ACL removed with -Q

Additional info:

example target:
<target iqn.2008-09.com.example:beaker-disk-2-d1-path1>
direct-store /dev/vg_virts/beaker-disk-2-1
initiator-name CLUSTER2
scsi_id beaker-disk-2-1
scsi_sn beaker-disk-2-1
write-cache off
</target>


The affected line in my case is line 1070 of tgt-admin:
execute("tgtadm -C $control_port --op unbind --mode target --tid $tgtadm_output_tid{$current_     target} -I $acl");

where -I should be (in my case) replaced with -Q (as it's a name and not an address). For general case probably both should be tried and exit code > 0 returned only when both fail.
Comment 2 Andy Grover 2013-05-29 13:54:08 EDT
patch? :-)
Comment 3 Jaroslav Kortus 2013-10-05 14:48:01 EDT
why is this set for me and needinfo? I put all info I had to the description already.
Comment 4 RHEL Product and Program Management 2013-10-13 23:29:32 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 5 Jaroslav Kortus 2015-10-09 09:40:26 EDT
I'm not able to reproduce the buggy behaviour with scsi-target-utils-1.0.24-16.el6.x86_64. I think we can close this for now.

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