On 09/19/2018 12:39 PM, Lee Duncan wrote: > Hi All: > > I have been tracking down an issue that has to do with iSCSI sessions going > away. > > If an initiator and target have a session, then iscsid goes away (stops or > dies, without logging out of the session), and then the target goes away, > iscsid has an issue when it starts back up. > > It looks like iscsid retries forever to reconnect the session. There doesn’t > appear to be any code that gives up and cleans up the session. Ever. > > During this retry-forever period, any attempt to access important session > information from sysfs returns ENOTCONN — a pretty clear indication that the > node is not connected. > > It seems to me like this is a bug. Or two: > > 1 - The retries should be limited to something reasonable, then give up and > clean up the session, assuming it’s “bad”, and > > 2 - When iscsiadm sees the ENOTCONN, it should print out a message saying “in > recovery to unconnected node, try again” while the retries are going on. > > Another approach might be to let the retries go on forever, or until a user > runs some sort of “force the session to end” command? > > I have been looking at this a while, and it’s not clear how simple it will be > to implement either of these approaches. Right now, this registers as a > “libopeniscsiusr BUG”, which is not acceptable. >
This is one of those things where I said I would fix if anyone ever complains, but luckily I made it through my entire time as maintainer and no one ever did. So, I guess basically tag you're it :) Checkout node.session.initial_login_retry_max and iscsi_login_eh. The current state machine detects the iscsid restart case as a relogin and so that setting does not kick in. You could: 1. modify the state machine check so it does. 2. add a new setting that works like initial_login_retry_max but doesn't really work like it :) What I mean is that initial_login_retry_max was trying to handle a lot of different cases so it is a little odd. See the iscsid.conf comments. You probably want to make something that is more straightforward. -- 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 https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.