<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#CCCCCC">
<div class="moz-cite-prefix">On 04/24/2014 02:20 PM, Sammy Atmadja
wrote:<br>
</div>
<blockquote cite="mid:20140424085034.GA22072@transtrend.com"
type="cite">
<pre wrap="">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 ---
</pre>
</blockquote>
<br>
Patch looks good. But just a quick question. If the specific target
session does not have any block device, wouldn't BLOCK_FILE be empty
and thus not fall under the if condition ?<br>
<br>
<pre class="moz-signature" cols="72">--
Ritesh Raj Sarraf | <a class="moz-txt-link-freetext" href="http://people.debian.org/~rrs">http://people.debian.org/~rrs</a>
Debian - The Universal Operating System
</pre>
</body>
</html>