* tgtadm delete without lld specified?
@ 2014-04-16 23:40 Lee Duncan
2014-04-20 12:20 ` FUJITA Tomonori
0 siblings, 1 reply; 3+ messages in thread
From: Lee Duncan @ 2014-04-16 23:40 UTC (permalink / raw)
To: stgt
I am debugging a problem on SUSE 11 SP3, with tgt 0.9.10.
I am creating two iSCSI targets using targets.conf. Neither target
specifies a low-level driver, and there is no default-driver specified
either.
The targets looks something like this:
<target iqn....t1>
backing-store /dev/some-device
vendor_id someid
product_id volume-num1
</target>
I create two of these targets, t1, and t2, then I using open-iscsi to
login to the first target, t1, then logout.
Then I run "tgt-admin --delete "iqn...t1". As you know, this just runs
"tgtadm --op delete --mode target --tid=<tid-of-t1>". No low-level
driver is specified.
Then I try to login to the second target, t2, using open-iscsi, and
the login hangs. This is because tgtd has died.
Further analysis shows that tgtd dies because when it tries to look up
the iscsi target structure for t2, the t1 entry is still around. And
when the code tries to get the name of this no-longer-existing target,
it gets NULL and tries to compare that with the iqn name being
added. This makes strcmp() very unhappy.
I find that if I manually specify the lld either on the command line
of "tgtadm", or in one of the config files, then this problem goes
away.
It looks like when I don't specify any LLD the upper-level code
defaults to low-lever-driver zero! This seems like a bug to me.
Shouldn't the "tgtadm" command enforce specifying the low-level
driver?
--
Lee Duncan
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: tgtadm delete without lld specified?
2014-04-16 23:40 tgtadm delete without lld specified? Lee Duncan
@ 2014-04-20 12:20 ` FUJITA Tomonori
2014-04-21 16:44 ` Lee Duncan
0 siblings, 1 reply; 3+ messages in thread
From: FUJITA Tomonori @ 2014-04-20 12:20 UTC (permalink / raw)
To: lduncan; +Cc: stgt
On Wed, 16 Apr 2014 16:40:09 -0700
Lee Duncan <lduncan@suse.com> wrote:
> I am debugging a problem on SUSE 11 SP3, with tgt 0.9.10.
>
> I am creating two iSCSI targets using targets.conf. Neither target
> specifies a low-level driver, and there is no default-driver specified
> either.
>
> The targets looks something like this:
>
> <target iqn....t1>
> backing-store /dev/some-device
> vendor_id someid
> product_id volume-num1
> </target>
>
> I create two of these targets, t1, and t2, then I using open-iscsi to
> login to the first target, t1, then logout.
>
> Then I run "tgt-admin --delete "iqn...t1". As you know, this just runs
> "tgtadm --op delete --mode target --tid=<tid-of-t1>". No low-level
> driver is specified.
>
> Then I try to login to the second target, t2, using open-iscsi, and
> the login hangs. This is because tgtd has died.
>
> Further analysis shows that tgtd dies because when it tries to look up
> the iscsi target structure for t2, the t1 entry is still around. And
> when the code tries to get the name of this no-longer-existing target,
> it gets NULL and tries to compare that with the iqn name being
> added. This makes strcmp() very unhappy.
Surely, sounds a bug. The latest code still has this bug?
> I find that if I manually specify the lld either on the command line
> of "tgtadm", or in one of the config files, then this problem goes
> away.
>
> It looks like when I don't specify any LLD the upper-level code
> defaults to low-lever-driver zero! This seems like a bug to me.
>
> Shouldn't the "tgtadm" command enforce specifying the low-level
> driver?
I guess that tgtadm command should use 'iscsi' by default if the
low-level driver is not specified.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tgtadm delete without lld specified?
2014-04-20 12:20 ` FUJITA Tomonori
@ 2014-04-21 16:44 ` Lee Duncan
0 siblings, 0 replies; 3+ messages in thread
From: Lee Duncan @ 2014-04-21 16:44 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: stgt
On 04/20/2014 05:20 AM, FUJITA Tomonori wrote:
> On Wed, 16 Apr 2014 16:40:09 -0700
> Lee Duncan <lduncan@suse.com> wrote:
>
>> I am debugging a problem on SUSE 11 SP3, with tgt 0.9.10.
>>
>> I am creating two iSCSI targets using targets.conf. Neither target
>> specifies a low-level driver, and there is no default-driver specified
>> either.
>>
>> The targets looks something like this:
>>
>> <target iqn....t1>
>> backing-store /dev/some-device
>> vendor_id someid
>> product_id volume-num1
>> </target>
>>
>> I create two of these targets, t1, and t2, then I using open-iscsi to
>> login to the first target, t1, then logout.
>>
>> Then I run "tgt-admin --delete "iqn...t1". As you know, this just runs
>> "tgtadm --op delete --mode target --tid=<tid-of-t1>". No low-level
>> driver is specified.
>>
>> Then I try to login to the second target, t2, using open-iscsi, and
>> the login hangs. This is because tgtd has died.
>>
>> Further analysis shows that tgtd dies because when it tries to look up
>> the iscsi target structure for t2, the t1 entry is still around. And
>> when the code tries to get the name of this no-longer-existing target,
>> it gets NULL and tries to compare that with the iqn name being
>> added. This makes strcmp() very unhappy.
>
> Surely, sounds a bug. The latest code still has this bug?
I will test the latest code, then submit a patch if the problem still
exists there.
>
>
>> I find that if I manually specify the lld either on the command line
>> of "tgtadm", or in one of the config files, then this problem goes
>> away.
>>
>> It looks like when I don't specify any LLD the upper-level code
>> defaults to low-lever-driver zero! This seems like a bug to me.
>>
>> Shouldn't the "tgtadm" command enforce specifying the low-level
>> driver?
>
> I guess that tgtadm command should use 'iscsi' by default if the
> low-level driver is not specified.
> --
> To unsubscribe from this list: send the line "unsubscribe stgt" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Lee Duncan
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-21 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16 23:40 tgtadm delete without lld specified? Lee Duncan
2014-04-20 12:20 ` FUJITA Tomonori
2014-04-21 16:44 ` Lee Duncan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox