Control: severity -1 important
Control: tags -1 + upstream confirmed
Control: retitle -1 Target portal group change at login not properly handled 
(logoutall skips session)

On 09/22/2016 01:35 PM, Colby Ross wrote:
> I think I figured out part of it. When its looking for the config
> file on logout, its looking in,3260,257 -- that does not
> exist on my system. However,,3260,1 does, but it doesn't
> check this. When I manually create the folder it is looking for and
> copy the "default" file to it, it logs out with iscsiadm -m node
> --logoutall=all. Not sure why its looking for that folder when it
> doesn't exist, but this should help you.

Ok, while I still have to figure out a way to easily reproduce it (I
can reproduce it in a more complex way), now I see where the problem
lies. You were logging in with the default target portal group (1),
but the target told you "errr, actually, I only have the target portal
group 257". The login was fine with that (and told the kernel the
right value), but since the logout tries to match the running session
against the database (which wasn't updated to reflect the new portal
group id), it pretends there are no sessions running.

I'm raising the severity of this bug to important, because it's really
ugly if a hang is caused in this kind of configuration.

So there are two problems:

 - either lack of database update when a different target portal
   group is detected at login or more likely, since database updates
   at login shouldn't actually happen, no real match against against
   the original configuration for a given running session

 - no useful error message when matching running session against
   configuration fails (it just skips it)

Since this is not Debian-specific, I'll forward this upstream. The
"workaround" you stumbled upon yourself is actually the way to make
your configuration match the actual target (technically, you'd still
need to update the node.tpgt = to 257 in the 'default' configuration
file), so I would suggest you keep that anyway, irrespective of this

Just a quick question: how precisely did you setup the iSCSI client
configuration? You have node.discovery_type = static in there, which
is unusual, because typically (when not using iSNS or the Firmware)
you'd use sendtargets discovery to get a list of targets for a given
portal, and then the TPG would be detected automatically.


Reply via email to