[Pkg-iscsi-maintainers] Bug#765431: open-iscsi: umountiscsi.sh script does not properly check while traverse sysfs structure

dmitry dmitry at bti.secna.ru
Mon Nov 10 20:14:00 UTC 2014


Hello!

On Sat, 08 Nov 2014 21:09:30 +0530 Ritesh Raj Sarraf 
<rrs at researchut.com> wrote:
> On 10/20/2014 08:58 AM, dmitry wrote:
> > Adding -x parameter to umountiscsi.sh
> >
> > And try to restart service:
> > root at archive:~# /etc/init.d/open-iscsi restart
> >
> > Look on exerpt output(full report in attached file):
> >
> > Here (the cause of problem):
> > + [ -d /sys/devices/platform/host4/iscsi_host ]
> > + [ -d /sys/devices/platform/host4/session1/target4:0:0 ]
> > + sed s/.*block\///
> > + echo /sys/devices/platform/host4/session1/target*/*:*/block/*
> > + BLOCK_DEV=*
>
> I still think we do not need the patch. Because...
>
> BLOCK_DEV=`echo "$BLOCK_FILE" | sed 's/.*block\///'`
> if [ "${BLOCK_DEV}" = "*" ];then
> log_warning_msg "iSCSI target without
> block devices found"
> continue
> fi
>
> Ideally you should have seen this warning message. But you are not
> seeing this message. Which may be that you are using an older or
> tampered version of the init script.


     I am sorry, but could you please be answered:

     If code above present in umountiscsi.sh init script where can I 
found correct (not tampered) version? As far as I see from contents of 
package umountiscsi.sh script does not contain this code. I look at 
packages from any different repository (ftp.de.debian.org, 
ftp.fi.debian.org, ftp.ru.debian.org) and could not found it.

>
>
> And the patch you provided is wrong. Because those block devices we 
> are
> looping for are not directories.

     Are you speaking about /dev/ contents? Am I wrong, that code:
"....
             for BLOCK_FILE in $SESSION_DIR/target*/*\:*/block/*; do
....
" -  loop for filesystem with directories?

>
>
> > + awk /^\/dev\/*/ { print $2; }
> > + DOS_PARTITIONS=/
> > + umount /
> > umount: /: device is busy.
> > (In some cases useful info about processes that use
> > the device is found by lsof(8) or fuser(1))
> > + exit_status=1
>
>
> --
> Ritesh Raj Sarraf
> RESEARCHUT - http://www.researchut.com
> "Necessity is the mother of invention."
>

--
Dmitry Danilov.



More information about the Pkg-iscsi-maintainers mailing list