Re: detection of failed sessions to allow re-login

Julian Satran <[email protected]> Fri, 20 Apr 2007 09:33:20 +0300
Newsgroups gmane.ietf.ips
Message-ID <OFE63EDEC7.DBDFD0B9-ONC22572C3.0022927F-C22572C3.0023FF80@il.ibm.com>
Paul,

"Paul Hughes" <[email protected]> wrote on 20/04/2007 02:13:49:

> I have a question about how a target can quickly detect session 
> failures so that a re-login can succeed.
> 
> Here's my scenario:
> 
> 1) an initiator is booting from an iSCSI target
> 2) the initiator is using an iSCSI HBA to communicate with the iSCSI 
target
> 3) the HBA BIOS creates the first session, discovers the boot LUN, 
> and reads the boot loader
> 4) the boot loader reads the kernel from the boot LUN
> 5) the kernel resets the iSCSI HBA while loading an HBA driver
> 6) the HBA driver attempts to create a new session
> 
> The problem I'm seeing is that the target is failing the login for 
> the new session because the target thinks the first session created 
> by the HBA BIOS is still valid (not in failed state).  The HBA reset
> was not detected by the target soon enough for the target to know 
> that the first session is now in the failed state when the initiator
> attempts to login and create the second session using the same 
> InitiatorName, ISID, TargetName, and TargetPortalGroupTag as the 
> first session (with TSIH=0).  The target does not see a link down 
> event because a switch is connected between the HBA and the target 
> port.  The target eventually detects that the first session is 
> failed when it sends a NOP-Out PDU and receives a transport failure.
> Unfortunately, this occurs too late and the boot fails.
> 
> In my case the target is sending NOP-Out PDUs every 60 seconds.  I 
> can change that to 5 seconds, but I don't think that will fix every 
> case.  Is there a better way for the target to determine that the 
> first session has failed so that a re-login will succeed on the first 
try?
> 

The target (if well integrated) has enough early warning that the old 
session/connection is gone (after all it established a new TCP 
connection!). But even if layering or "smart" HBAs stands in your way 3720 
states clearly that a login with the same identifying elements as an 
existing connection (including CID) should clear the connection (implicit 
logout). If the connection is the only connection of the session the 
result is equivalent to establishing a new session (except for some corner 
cases in which BIOS might have made some reservations which are then 
inherited by new connection).

So your boot should work whether the target interprets the login as a 
session clearing (somewhat different to what the 3270 text) or a 
connection clearing (that is what 3270 says).

If it doesn't work the target implementation is wrong.

Julo
> Thanks,
> Paul
> 
> 
>  _______________________________________________
> Ips mailing list
> [email protected]
> https://www1.ietf.org/mailman/listinfo/ips

_______________________________________________
Ips mailing list
[email protected]
https://www1.ietf.org/mailman/listinfo/ips