Bug 736740 - "tgt-admin --update" fails when adding many devices to the configuration file at once
Summary: "tgt-admin --update" fails when adding many devices to the configuration file...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: scsi-target-utils
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Storage QE
URL:
Whiteboard:
: 727801 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-08 15:04 UTC by Rami Vaknin
Modified: 2014-01-12 23:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 18:58:53 UTC


Attachments (Terms of Use)
fix (1.11 KB, patch)
2011-10-03 22:53 UTC, Andy Grover
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1762 normal SHIPPED_LIVE scsi-target-utils bug fix and enhancement update 2011-12-06 01:01:30 UTC

Description Rami Vaknin 2011-09-08 15:04:52 UTC
Environment:
scsi-target-utils-1.0.14-2.el6.x86_64 on RHEL6.1

I updated the /etc/tgt/targets.conf with:
scenario a - 250 targets, each target contains one lun (lvs as backing store)
scenario b - 1 target with 250 luns (lvs as backing store)

Then I tried to restart tgtd or perform "tgt-admin --update ALL", the tgtd restart failed and the "tgt-admin --update ALL" fails every time with the same error message but each time on different target, it seems that each "tgt-admin --update ALL" can deal with only ~7-10 new target which it opens successfully and then it fails.

For the case of 250 targets - I need to run "tgt-admin --update ALL" ~30 times for all devices to be open.

[root@lion ~]# for i in `seq 1 10` ; do tgt-admin --update ALL ; done
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 60 -T script121
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 74 -T script134
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 77 -T script137
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 78 -T script138
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 92 -T script150
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 93 -T script141
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 110 -T script167
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 111 -T script159
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 113 -T script17
exited with code: 22.
tgtadm: this target already exists
Command:
	tgtadm -C 0 --lld iscsi --op new --mode target --tid 114 -T script170
exited with code: 22.
[root@lion ~]#

Comment 2 Andy Grover 2011-09-30 22:41:43 UTC
just to be clear, both scenario A and B show the same issue, each run of update --ALL only handles 7-10 before failing?

Comment 3 Rami Vaknin 2011-10-02 09:09:21 UTC
Correct.

Comment 4 Andy Grover 2011-10-03 22:53:47 UTC
Created attachment 526151 [details]
fix

Can reproduce. This fixes it for me.

Comment 7 Rami Vaknin 2011-10-09 11:23:15 UTC
Not reproducible with the rpm from Comment 5.

Comment 9 Barry Donahue 2011-10-17 18:17:08 UTC
Verified in comment 7 and SanityOnly.

Comment 10 Andy Grover 2011-11-03 00:12:42 UTC
*** Bug 727801 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2011-12-06 18:58:53 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-2011-1762.html


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