Re: Errors when log out a deleted target

2015-07-23 Thread Mike Christie
On 07/23/2015 01:37 AM, LSZhu wrote:
 Hi experts,
 
 When I try to log out a target which is already deleted at the target
 server side, I can see a error :
 
 Logging out of session [sid: 1, target:
 iqn.2015-07.com.example:test:844a36e0-e921-4988-9538-a32112aa40d4,
 portal: 147.2.207.200,3260]
 iscsiadm: Could not logout of [sid: 1, target:
 iqn.2015-07.com.example:test:844a36e0-e921-4988-9538-a32112aa40d4,
 portal: 147.2.207.200,3260].
 iscsiadm: initiator reported error (9 - internal error)
 iscsiadm: Could not logout of all requested sessions
 

You might have to provide some more info or debug some more.

When you say server side, do you mean server on the initiator box you
deleted the target/portal record? If so, then the tools cannot probably
not match objects properly. When you delete the target/portal record,
you should have actually got a error saying you cannot delete it while
logged in.

If when you say server, you mean you deleted it on the target, then in
non-discoveryd mode the logout should work fine. iscsiadm should not
report any errors at least. If the target has already been detected as
down, we just force a shutdown of the session. What this means is that
since the session is dropped, we do not send a logout and instead just
clean up the kernel/userspace structs and return. If we have not yet
detected the target is down, then we would try to send a logout. That
would timeout which would lead to us dropping the session, and then
doing a forced shutdown like in the other case.

-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Errors when log out a deleted target

2015-07-23 Thread LSZhu
Hi experts,

When I try to log out a target which is already deleted at the target 
server side, I can see a error :

Logging out of session [sid: 1, target: 
iqn.2015-07.com.example:test:844a36e0-e921-4988-9538-a32112aa40d4, portal: 
147.2.207.200,3260]
iscsiadm: Could not logout of [sid: 1, target: 
iqn.2015-07.com.example:test:844a36e0-e921-4988-9538-a32112aa40d4, portal: 
147.2.207.200,3260].
iscsiadm: initiator reported error (9 - internal error)
iscsiadm: Could not logout of all requested sessions

I think maybe the reason is that, the target is deleted, so the initiator 
can not get a logout response PDU, so errors.We would meet the same 
situation when target still alive but network down.
I have a proposal, can we set a time out values, for example 10 seconds, 
once time out, log out anyway, then print some message like The target is 
not reachable, logged out. I think this operation is not harmful to the 
target side.
Do you experts think that make sense?


Thanks
BR
Zhu Lingshan

-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: Errors when log out a deleted target

2015-07-23 Thread LSZhu
Hi experts,

I have another concern, if we log out a deleted target, I think that is 
fine. 
But if we log out a network blocked target anyway when the log out PDU time 
out,  will the target side keep the information of the initiator? Maybe 
that would introduce some confliction in next login.

Thanks,
BR
Zhu Lingshan

在 2015年7月23日星期四 UTC+8下午2:37:18,LSZhu写道:

 Hi experts,

 When I try to log out a target which is already deleted at the target 
 server side, I can see a error :

 Logging out of session [sid: 1, target: 
 iqn.2015-07.com.example:test:844a36e0-e921-4988-9538-a32112aa40d4, portal: 
 147.2.207.200,3260]
 iscsiadm: Could not logout of [sid: 1, target: 
 iqn.2015-07.com.example:test:844a36e0-e921-4988-9538-a32112aa40d4, portal: 
 147.2.207.200,3260].
 iscsiadm: initiator reported error (9 - internal error)
 iscsiadm: Could not logout of all requested sessions

 I think maybe the reason is that, the target is deleted, so the initiator 
 can not get a logout response PDU, so errors.We would meet the same 
 situation when target still alive but network down.
 I have a proposal, can we set a time out values, for example 10 seconds, 
 once time out, log out anyway, then print some message like The target is 
 not reachable, logged out. I think this operation is not harmful to the 
 target side.
 Do you experts think that make sense?


 Thanks
 BR
 Zhu Lingshan


-- 
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.