Package: open-iscsi
Version: 2.0.873-3
Severity: normal
Tags: patch

Dear Maintainer,

While rebooting a server with iscsi partitions I encountered bug
#691732 . Seeing that #691732 was fixed in version
2.0.873+git0.3b4b4500-1 of open-iscsi I looked over the changes and
noticed that if umountiscsi.sh finds an iscsi target without block
devices it does an exit 0 while in the middle of the for loop and
skips the rest of the targets.

This could be a problem if the target without block devices is not the
last target. See my patch below which continues instead of an exit.

Sammy

-- System Information:
Debian Release: 7.4
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 3.13-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages open-iscsi depends on:
ii  libc6  2.13-38+deb7u1
ii  udev   204-8~bpo70+1

open-iscsi recommends no packages.

open-iscsi suggests no packages.

-- Configuration Files:
/etc/iscsi/initiatorname.iscsi [Errno 13] Permission denied: 
u'/etc/iscsi/initiatorname.iscsi'

-- no debconf information

--- patch for umountiscsi.sh ---
diff --git a/debian/umountiscsi.sh.init b/debian/umountiscsi.sh.init
index 8f7161b..d5b0591 100644
--- a/debian/umountiscsi.sh.init
+++ b/debian/umountiscsi.sh.init
@@ -56,9 +56,8 @@ do_stop () {
                for BLOCK_FILE in $SESSION_DIR/target*/*\:*/block/*; do
                        BLOCK_DEV=`echo "$BLOCK_FILE" | sed 's/.*block\///'`
                        if [ "${BLOCK_DEV}" = "*" ];then
-                               log_warning_msg "No iSCSI block devices found"
-                               log_end_msg 0
-                               exit 0
+                               log_warning_msg "iSCSI target without block 
devices found"
+                               continue
                        fi
                        DOS_PARTITIONS="`awk "/^\/dev\/$BLOCK_DEV/ { print 
\\$2; }" < /proc/mounts`"
                        for DEVICE in $DOS_PARTITIONS; do
--- end patch ---


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to