Hi Ritesh,      

On 02/07/2016 10:41 AM, Ritesh Raj Sarraf wrote:
> Looks like this invocation is problematic
> 
> root@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@debian-sanboot:~# bash /lib/open-iscsi/umountiscsi.sh ^C
> root@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?

Regards,
Christian

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to