Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1409996 - creating multiple backstores in parallel fails
Summary: creating multiple backstores in parallel fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: targetcli
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Maurizio Lombardi
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks: 1790919
TreeView+ depends on / blocked
 
Reported: 2017-01-04 06:54 UTC by Prasanna Kumar Kalever
Modified: 2020-09-29 19:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:56:54 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch for targetcli (2.23 KB, patch)
2020-02-12 16:51 UTC, Maurizio Lombardi
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github open-iscsi rtslib-fb issues 36 0 'None' open synchronize access to configfs 2020-07-09 10:31:16 UTC
Red Hat Product Errata RHEA-2020:3931 0 None None None 2020-09-29 19:56:59 UTC

Description Prasanna Kumar Kalever 2017-01-04 06:54:38 UTC
Description of problem:
targetcli fails while creating multiple backstores

Version-Release number of selected component (if applicable):
targetcli-2.1.fb43
python-rtslib-2.1.fb59-2.fc24.noarch

How reproducible:
100%

Steps to Reproduce:
# for i in {1..50}; do targetcli /backstores/fileio create LUN${i} /mnt/file${i} 10M& done


Actual results:
Errors like:
Storage object fileio/LUN2 not found
This _Backstore already exists in configFS

Expected results:
Successful backstores creations

Comment 3 Maurizio Lombardi 2017-11-24 16:05:08 UTC
I'm discussing it with Andy Grover.

The patch mentioned in the "external trackers" section has never been merged and I asked him why, this is his answer:

---
The reason that hasn't been merged is that it doesn't really get the whole job done. It only protects three methods, when really *every* call that touches configfs needs to take the lock. And dropping the lock between commands in targetcli is not sufficient to prevent staleness. One way to do this might be to tie this to acquiring RTSRoot. But this all would be a big API change that needs some serious thought, and examination and perhaps modifications to current code.

The other thing is that theoretically other LIO users not using rtslib should also perform the same locking, so it would be best if whatever solution rtslib uses to guard against other instances of itself also works for non-rtslib LIO configuration libs (there's at least one in Perl that I know of). 
---

Comment 21 Maurizio Lombardi 2020-02-11 14:45:47 UTC
Move to 7.9

Comment 25 Maurizio Lombardi 2020-02-12 15:43:52 UTC
Sunil, I noticed you set the blocker flag so I suppose you want it in 7.8

I set the 7.8.0 flag

Comment 26 Maurizio Lombardi 2020-02-12 15:46:00 UTC
The patch will be merged in targetcli, not in rtslib

Comment 28 Maurizio Lombardi 2020-02-12 16:51:30 UTC
Created attachment 1662726 [details]
Patch for targetcli

This is the patch for targetcli that I am going to push

Comment 34 Filip Suba 2020-05-27 10:09:04 UTC
Verified with targetcli-2.1.51-2.el7. Regression testing passed.

# for i in {1..50}; do targetcli /backstores/fileio create LUN${i} /mnt/file${i} 10M& done
Created fileio LUN2 with size 10485760
Created fileio LUN20 with size 10485760
Created fileio LUN23 with size 10485760
Created fileio LUN12 with size 10485760
Created fileio LUN27 with size 10485760
Created fileio LUN47 with size 10485760
Created fileio LUN31 with size 10485760
Created fileio LUN18 with size 10485760
Created fileio LUN30 with size 10485760
Created fileio LUN11 with size 10485760
Created fileio LUN6 with size 10485760
Created fileio LUN16 with size 10485760
Created fileio LUN14 with size 10485760
Created fileio LUN19 with size 10485760
Created fileio LUN37 with size 10485760
Created fileio LUN48 with size 10485760
Created fileio LUN4 with size 10485760
Created fileio LUN29 with size 10485760
Created fileio LUN50 with size 10485760
Created fileio LUN32 with size 10485760
Created fileio LUN25 with size 10485760
Created fileio LUN10 with size 10485760
Created fileio LUN33 with size 10485760
Created fileio LUN24 with size 10485760
Created fileio LUN40 with size 10485760
Created fileio LUN21 with size 10485760
Created fileio LUN22 with size 10485760
Created fileio LUN3 with size 10485760
Created fileio LUN43 with size 10485760
Created fileio LUN7 with size 10485760
Created fileio LUN9 with size 10485760
Created fileio LUN46 with size 10485760
Created fileio LUN36 with size 10485760
Created fileio LUN13 with size 10485760
Created fileio LUN15 with size 10485760
Created fileio LUN8 with size 10485760
Created fileio LUN44 with size 10485760
Created fileio LUN34 with size 10485760
Created fileio LUN28 with size 10485760
Created fileio LUN49 with size 10485760
Created fileio LUN26 with size 10485760
Created fileio LUN42 with size 10485760
Created fileio LUN1 with size 10485760
Created fileio LUN35 with size 10485760
Created fileio LUN38 with size 10485760
Created fileio LUN17 with size 10485760
Created fileio LUN5 with size 10485760
Created fileio LUN41 with size 10485760
Created fileio LUN39 with size 10485760
Created fileio LUN45 with size 10485760

Comment 36 errata-xmlrpc 2020-09-29 19:56:54 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 (targetcli bug fix and enhancement update), 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/RHEA-2020:3931


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