Bug 1409996
| Summary: | creating multiple backstores in parallel fails | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Prasanna Kumar Kalever <prasanna.kalever> | ||||
| Component: | targetcli | Assignee: | Maurizio Lombardi <mlombard> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Filip Suba <fsuba> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 7.4 | CC: | fsuba, lmiksik, mlombard, prasanna.kalever, rcyriac, revers, sheggodu, tgill, wchadwic | ||||
| 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: | 2020-09-29 19:56:54 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1790919 | ||||||
| Attachments: |
|
||||||
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). --- Move to 7.9 Sunil, I noticed you set the blocker flag so I suppose you want it in 7.8 I set the 7.8.0 flag The patch will be merged in targetcli, not in rtslib Created attachment 1662726 [details]
Patch for targetcli
This is the patch for targetcli that I am going to push
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
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 |
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