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.
Bug 838759 - [FCoE TGT] Fileio dont' check duplicate storage object creation. Need open with O.EXCL
Summary: [FCoE TGT] Fileio dont' check duplicate storage object creation. Need open wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-rtslib
Version: 6.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Gris Ge
URL:
Whiteboard:
Depends On:
Blocks: 840683
TreeView+ depends on / blocked
 
Reported: 2012-07-10 02:34 UTC by Gris Ge
Modified: 2013-02-21 10:54 UTC (History)
2 users (show)

Fixed In Version: python-rtslib-2.1.fb21-1.el6, fcoe-target-utils-2.0rc1.fb16-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 10:54:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0466 0 normal SHIPPED_LIVE python-rtslib bug fix update 2013-02-20 21:07:12 UTC

Description Gris Ge 2012-07-10 02:34:37 UTC
Description of problem:
It's wrong to allowed 2 fileio storage object pointing to same fileio.
====
|   o- lun4 [fileio/disk20120705163234204805 (/tmp/lun_4_testabc)]
|   o- lun5 [fileio/disk20120705163722400445 (/tmp/lun_4_testabc)]
====

Need O.EXCL.

Version-Release number of selected component (if applicable):
RHEL 6.3 GA
fcoe-target-utils-2.0rc1.fb10-5.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Execute this command twice:
targetcli /backstores/fileio create $disk_name $lun_name ${size_bytes}B
2.
3.
  
Actual results:
2 fileios pointing to same file.

Expected results:
fcoe-target-utils should warn and fail to create duplicate storage object.
Same rule should also applied to block and pscsi backstore types.

Additional info:
beta blocker requested as this bug will cause data corruption if 2 storage objects mapped hosts but with same data file.

Comment 1 Gris Ge 2012-07-10 05:16:38 UTC
The same thing also happen to LUN Mapping:
=====
    o- 20:00:00:1b:21:59:12:37 . [enabled]
      o- acls .. [1 ACL]
      | o- 10:00:00:05:1e:8f:fa:da ......... [3 Mapped LUNs]
      |   o- mapped_lun0 ......... [lun0 fileio/disk20120709141129331401 (rw)]
      |   o- mapped_lun1 ......... [lun0 fileio/disk20120709141129331401 (rw)]
      |   o- mapped_lun2 ......... [lun0 fileio/disk20120709141129331401 (rw)]
      o- luns .. [1 LUN]
        o- lun0 ....... [fileio/disk20120709141129331401 (/tmp/lun_4_testabc)]
=====

Please fix it also.

Comment 7 Gris Ge 2012-11-30 05:00:34 UTC
Still got 
===
      o- luns ................... [2 LUNs]
        o- lun0 ......... [fileio/disk1 (/tmp/fcoe-lun1)]
        o- lun1 ......... [fileio/disk1 (/tmp/fcoe-lun1)]
===
in fcoe-target-utils-2.0rc1.fb16-2.el6.noarch

For MapLUN and fileio, duplication check works well:
===
/> /tcm_fc/20:00:00:1b:21:59:12:37/acls/20:00:00:10:18:88:e9:4b create 0 1
This MappedLUN already exists in configFS.
/> /backstores/fileio create disk1 /tmp/fcoe-lun1 10240M
Using params size=10240M write_back=True sparse=True
storage object for /tmp/fcoe-lun1 already exists
===

Since duplication check for this command is not fix yet:
====
/tcm_fc/20:00:00:1b:21:59:12:36/luns/ create /backstores/fileio/disk1
====

I am assigning this bug back for further work.

Comment 13 Gris Ge 2013-01-04 08:25:29 UTC
Fixed in fcoe-target-utils-2.0rc1.fb16-3.el6.noarch
===
/> /tcm_fc/20:00:00:1b:21:59:12:37/acls/20:00:00:10:18:88:e9:4b create 0 1
This MappedLUN already exists in configFS.
/> /backstores/fileio create disk1 /tmp/fcoe-lun1 10240M
Using params size=10240M write_back=True sparse=True
Created fileio disk1 with size 10737418240
/> /backstores/fileio create disk1 /tmp/fcoe-lun1 10240M
Using params size=10240M write_back=True sparse=True
storage object for /tmp/fcoe-lun1 already exists
/> /backstores/fileio create disk1 /tmp/fcoe-lun1 10240M
Using params size=10240M write_back=True sparse=True
storage object for /tmp/fcoe-lun1 already exists
/> /tcm_fc/20:00:00:1b:21:59:12:36/luns/ create /backstores/fileio/disk1
Created LUN 3.
/> /tcm_fc/20:00:00:1b:21:59:12:36/luns/ create /backstores/fileio/disk1
lun for storage object /backstores/fileio/disk1 already exists
====

verify.

Comment 15 errata-xmlrpc 2013-02-21 10:54:44 UTC
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.

http://rhn.redhat.com/errata/RHBA-2013-0466.html


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