[Pkg-iscsi-maintainers] Bug#809334: Bug#809334: Bug#809320: open-iscsi: no session termination on stop

Christian Seiler christian at iwakd.de
Sun Feb 7 10:39:27 UTC 2016

Hi Ritesh,	

On 02/07/2016 10:41 AM, Ritesh Raj Sarraf wrote:
> Looks like this invocation is problematic
> root at debian-sanboot:~# /lib/open-iscsi/umountiscsi.sh 
> ls: cannot access /dev/sda?*: No such file or directory
> ls: cannot access /dev/sdb?*: No such file or directory
> ls: cannot access /dev/sdc?*: No such file or directory
> ls: cannot access /dev/sdd?*: No such file or directory

This is a cosmetic issue, but harmless. Fixed regardless.

> From what you've explained, this is what I've gotten below.
> root at debian-sanboot:~# bash /lib/open-iscsi/umountiscsi.sh ^C
> root at debian-sanboot:~# cat /run/open-iscsi/shutdown-keep-sessions 
> /sys/devices/platform/host2/session1
> /sys/devices/platform/host3/session2
> /sys/devices/platform/host4/session3
> /sys/devices/platform/host5/session4

That's great, so this means umountiscsi.sh properly detects
your setup.

> But with all this setting, it hangs the shutdown, because all session
> are then terminated.

That's not so great.

I looked at the source code of logout-all.sh again found
the mistake: when reading in /run/o-i/s-k-s, it would just use
XXX=$(cat /run/o-i/s-k-s)
But to then check whether a session was excluded, it would use
the in_set code also used in umountiscsi.sh. Problem with that
code is that it expects whitespaces as separators for the values,
while reading in the file will have newlines as terminators.

I've pushed a fix to git. I don't have a test setup that uses
multiple sessions (but I tested the functionality in a separate
shell script), so you should definitely test it - but it doesn't
break for single sessions at least, which I could test here.

Could you therefore please test the current git master on alioth?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20160207/0bc1850e/attachment-0003.sig>

More information about the Pkg-iscsi-maintainers mailing list