[stgt] tgtadm: this target already exists - with >100 targets

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Tue Jul 3 18:13:04 CEST 2012

On Tue, 03 Jul 2012 16:03:32 +0200
Konstantin Skaburskas <konstan at sixsq.com> wrote:

> Hi,
> We use tgtd with >100 targets and from time to time we see failures of
> tgt-admin --update <iqn>
> with iqn predefined in a conf file. The reported failures are
> # Adding target: test_aaa
> tgtadm -C 0 --lld iscsi --op new --mode target --tid 401 -T test_aaa
> tgtadm: this target already exists
> Command:
>     tgtadm -C 0 --lld iscsi --op new --mode target --tid 401 -T test_aaa
> exited with code: 22.
> We discovered that calculation of 'tid' value happens in tgt-admin and
> it seems like if tgtd is under a relatively high load
> sub process_targets {
> ...
>    my @show_target = `tgtadm -C $control_port --op show --mode target`;
> doesn't actually get the full list of targets, and then later on
> calculated $next_tid actually clashes with already existing target id.

Sounds like mgmt bugs.

What version you use? The mgmt code was rewritten in 1.0.25 so it
would be great if you could try 1.0.24 and the latest.

To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

More information about the stgt mailing list