Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1274032[details]
Modification of client script to induce issue
Description of problem:
create_export will not create a mapped LUN for an initiator if that same lun is mapped to a different initiator.
Version-Release number of selected component (if applicable):
How reproducible:
Reproducible every time.
Steps to Reproduce:
These two targetd API calls will show the bug:
jsonrequest('export_create', dict(pool=pool, vol='test18', initiator_wwn='iqn.2006-03.com.wtf.ohyeah:661', lun=1))
jsonrequest('export_create', dict(pool=pool, vol='test18', initiator_wwn='iqn.2006-03.com.wtf.ohyeah:662', lun=1))
More detailed steps:
1. Setup a host with targetd
2. Modify the attached client script to suit the test environment, specifically
line 46-53:
user = "admin"
password = "redhat"
host = '172.31.0.127'
port = 18700
path = '/targetrpc'
id_num = 1
ssl = False
pool = 'my_vg'
3. Execute client script
4. Observe output on iscsi server.
Actual results:
/iscsi/iqn.20...uto/tpg1/acls> ls
o- acls ............................................................................ [ACLs: 2]
o- iqn.2006-03.com.wtf.ohyeah:661 ......................................... [Mapped LUNs: 1]
| o- mapped_lun1 ............................................ [lun0 block/my_vg:test18 (rw)]
o- iqn.2006-03.com.wtf.ohyeah:662 ......................................... [Mapped LUNs: 0]
Expected results:
o- acls ............................................................................ [ACLs: 2]
o- iqn.2006-03.com.wtf.ohyeah:661 ......................................... [Mapped LUNs: 1]
| o- mapped_lun1 ............................................ [lun0 block/my_vg:test18 (rw)]
o- iqn.2006-03.com.wtf.ohyeah:662 ......................................... [Mapped LUNs: 1]
o- mapped_lun1 ............................................ [lun0 block/my_vg:test18 (rw)]
Additional info:
Created attachment 1274034[details]
Patch to correct the issue
This patch should fix the issue, by looking at both if a mapped lun exists in the target AND if that LUN is mapped in an initiator acl.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2017:1982
Created attachment 1274032 [details] Modification of client script to induce issue Description of problem: create_export will not create a mapped LUN for an initiator if that same lun is mapped to a different initiator. Version-Release number of selected component (if applicable): How reproducible: Reproducible every time. Steps to Reproduce: These two targetd API calls will show the bug: jsonrequest('export_create', dict(pool=pool, vol='test18', initiator_wwn='iqn.2006-03.com.wtf.ohyeah:661', lun=1)) jsonrequest('export_create', dict(pool=pool, vol='test18', initiator_wwn='iqn.2006-03.com.wtf.ohyeah:662', lun=1)) More detailed steps: 1. Setup a host with targetd 2. Modify the attached client script to suit the test environment, specifically line 46-53: user = "admin" password = "redhat" host = '172.31.0.127' port = 18700 path = '/targetrpc' id_num = 1 ssl = False pool = 'my_vg' 3. Execute client script 4. Observe output on iscsi server. Actual results: /iscsi/iqn.20...uto/tpg1/acls> ls o- acls ............................................................................ [ACLs: 2] o- iqn.2006-03.com.wtf.ohyeah:661 ......................................... [Mapped LUNs: 1] | o- mapped_lun1 ............................................ [lun0 block/my_vg:test18 (rw)] o- iqn.2006-03.com.wtf.ohyeah:662 ......................................... [Mapped LUNs: 0] Expected results: o- acls ............................................................................ [ACLs: 2] o- iqn.2006-03.com.wtf.ohyeah:661 ......................................... [Mapped LUNs: 1] | o- mapped_lun1 ............................................ [lun0 block/my_vg:test18 (rw)] o- iqn.2006-03.com.wtf.ohyeah:662 ......................................... [Mapped LUNs: 1] o- mapped_lun1 ............................................ [lun0 block/my_vg:test18 (rw)] Additional info: