Weird login

299 views
Skip to first unread message

Albert Pauw

unread,
Jul 17, 2008, 1:27:31 PM7/17/08
to open-iscsi
Hi Mike,

hope you can replicate this.

I started up stgt to function as the target, but with no target
defined.
I have a script with can add a target later, using tgtadm, the target
created by this script is already in the open-iscsi database, so I
don't have to do a discovery anymore.

I tried to login with open-iscsi into the "target" (as I had forgotton
to
run the script to actually create the target in stgt). Obviously, it
won't
work, I break off the login with CTRL-C.

Now I run my target script to create the target, and try to login
again
with open-iscsi, now I get the following error:

[root@orange usr]# iscsiadm -m node -T iqn.2008-07:virtual-
disk:orange.pauw.homeunix.net -l
Logging in to [iface: default, target: iqn.2008-07:virtual-
disk:orange.pauw.homeunix.net, portal: 127.0.0.1,3260]
iscsiadm: Could not login to [iface: default, target: iqn.
2008-07:virtual-disk:orange.pauw.homeunix.net, portal:
127.0.0.1,3260]:
iscsiadm: initiator reported error (15 - already exists)

I have to stop and restart the initiator get it to log in again.

Are you able to replicate this?

Albert

Mike Christie

unread,
Jul 17, 2008, 5:55:06 PM7/17/08
to open-...@googlegroups.com
Albert Pauw wrote:
> Hi Mike,
>
> hope you can replicate this.
>
> I started up stgt to function as the target, but with no target
> defined.
> I have a script with can add a target later, using tgtadm, the target
> created by this script is already in the open-iscsi database, so I
> don't have to do a discovery anymore.
>
> I tried to login with open-iscsi into the "target" (as I had forgotton
> to
> run the script to actually create the target in stgt). Obviously, it
> won't
> work, I break off the login with CTRL-C.
>

You do CTRL-C to iscsiadm right?

> Now I run my target script to create the target, and try to login
> again
> with open-iscsi, now I get the following error:
>
> [root@orange usr]# iscsiadm -m node -T iqn.2008-07:virtual-
> disk:orange.pauw.homeunix.net -l
> Logging in to [iface: default, target: iqn.2008-07:virtual-
> disk:orange.pauw.homeunix.net, portal: 127.0.0.1,3260]
> iscsiadm: Could not login to [iface: default, target: iqn.
> 2008-07:virtual-disk:orange.pauw.homeunix.net, portal:
> 127.0.0.1,3260]:
> iscsiadm: initiator reported error (15 - already exists)
>
> I have to stop and restart the initiator get it to log in again.
>

iscsiadm does not fully cleanup from a CTRL-C correctly. It will break
out of whatever it is doing, but if it was in the middle of trying to
login to a target that was not there it would not clean that login
attempt up as a result of the CTRL-C. So if you run iscsiadm again, and
iscsid is still trying to login from the attempt that got CTRL-C'd you
get the error above, because iscsid is still working on the first
request. What will eventually happen is the first attempt will fail or
succeed (there is actually a bug in older tools where we might retry
forever though).

So it is a known bug. I will get to it soonish. It is low on the list
because it only happens when we do a CTRL-C.

Albert Pauw

unread,
Jul 19, 2008, 9:06:51 AM7/19/08
to open-iscsi
Thanks Mike,

you were correct, I used CTRL-C to break out of the command.

We'll leave it then, since it is a know problem.
Reply all
Reply to author
Forward
0 new messages