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

Konstantin Skaburskas konstan at sixsq.com
Tue Jul 3 16:03:32 CEST 2012


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.

Is it know? Is it tgtadm<->mgmt IPC problem, or tgtd privileges iSCSI 
conns over mgmt tasks and thus, returning what it could withing a 
minimal time slot?

Thank you in advance for your clarifications.

Regards,
Konstantin

--
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