OBS User unknown 2008-11-10 14:26:24 +00:00 committed by Git OBS Bridge
parent c57f623336
commit a03d4e1ef9
5 changed files with 146 additions and 1 deletions

View File

@ -0,0 +1,27 @@
commit 1b043535b5584cf8298bf535e5794289f1b98f43
Author: Hannes Reinecke <hare@suse.de>
Date: Tue Nov 4 09:40:26 2008 +0100
Check for empty mpvecs in mpvec_garbage_collector()
During shutdown the mpvec pointer can indeed be empty, so we should
check it first before trying to access it.
References: 437245
Signed-off-by: Hannes Reinecke <hare@suse.de>
diff --git a/multipathd/main.c b/multipathd/main.c
index 78e6ed3..a4b0311 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -798,6 +798,9 @@ mpvec_garbage_collector (struct vectors * vecs)
struct multipath * mpp;
unsigned int i;
+ if (!vecs->mpvec)
+ return;
+
vector_foreach_slot (vecs->mpvec, mpp, i) {
if (mpp && mpp->alias && !dm_map_present(mpp->alias)) {
condlog(2, "%s: remove dead map", mpp->alias);

View File

@ -0,0 +1,34 @@
commit 1942363f6acc7d9e507d4bc82063287da19cd05a
Author: Hannes Reinecke <hare@suse.de>
Date: Tue Nov 4 10:08:01 2008 +0100
dmraid uuid starts with 'DMRAID'
The dmraid uuid starts with 'DMRAID', not 'dmraid'.
References: 439439
Signed-off-by: Hannes Reinecke <hare@suse.de>
diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index 2746eff..3e09dcf 100644
--- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules
@@ -18,7 +18,7 @@ ENV{DM_UUID}=="mpath-*", \
SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
# Create persistent links for dmraid tables
-ENV{DM_UUID}=="dmraid-*", \
+ENV{DM_UUID}=="DMRAID-*", \
SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
# Create persistent links for linear tables
@@ -32,7 +32,7 @@ ENV{DM_PART}=="?*", \
# Create dm tables for partitions
ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \
RUN+="/sbin/kpartx -a -p _part /dev/$kernel"
-ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \
+ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="DMRAID-*", \
RUN+="/sbin/kpartx -a -p _part /dev/$kernel"
ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="linear-*", \
RUN+="/sbin/kpartx -a -p _part /dev/$kernel"

View File

@ -0,0 +1,67 @@
commit 4322929c30a2f2bb57ebb1d427eb7536adb05dc1
Author: Hannes Reinecke <hare@suse.de>
Date: Thu Nov 6 09:16:00 2008 +0100
Handle arguments to multipathd from the init file
Introduces a $ARGS variable through which we could
pass arguments to multipathd.
There's also a change in the stop section of the initscript. If multipathd
is manually executed with an option like "-v9", the output of $DAEMON does not
match $PROCNAME. This leads to multipathd never being killed when stop is called
Signed-off-by: Ritesh Raj Sarraf <rsarraf@netapp.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
diff --git a/multipathd/multipathd.init.suse b/multipathd/multipathd.init.suse
index 664a4c5..d9bcc51 100755
--- a/multipathd/multipathd.init.suse
+++ b/multipathd/multipathd.init.suse
@@ -22,6 +22,7 @@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/sbin/multipathd
PIDFILE=/var/run/multipathd.pid
+ARGS=""
# Set the maximum number of open files
MAX_OPEN_FDS=4096
@@ -46,11 +47,11 @@ case "$1" in
if [ -f $PIDFILE ]; then
PID="$(cat $PIDFILE)"
- PROCNAME="$(ps -o cmd --no-headers $PID)"
+ PROCNAME="$(ps -p $PID -o comm=)"
fi
- if [ "$PROCNAME" != "$DAEMON" ]; then
- $DAEMON
+ if [ "$PROCNAME" != `basename $DAEMON` ]; then
+ $DAEMON $ARGS
fi
# Remember status and be verbose
@@ -64,10 +65,10 @@ case "$1" in
# So implement a cruder version:
if [ -f $PIDFILE ]; then
PID="$(cat $PIDFILE)"
- PROCNAME="$(ps -o cmd --no-headers $PID)"
+ PROCNAME="$(ps -p $PID -o comm=)"
fi
- if [ "$PROCNAME" == "$DAEMON" ]; then
+ if [ "$PROCNAME" == `basename $DAEMON` ]; then
kill -TERM $PID
fi
@@ -109,8 +110,8 @@ case "$1" in
if [ -f $PIDFILE ]; then
PID="$(cat $PIDFILE)"
- PROCNAME="$(ps -o cmd --no-headers $PID)"
- if [ "$PROCNAME" == "$DAEMON" ]; then
+ PROCNAME="$(ps -p $PID -o comm=)"
+ if [ "$PROCNAME" == `basename $DAEMON` ]; then
(exit 0)
else
(exit 1)

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Nov 10 08:51:26 CET 2008 - hare@suse.de
- Check for empty mpvecs in mpvec_garbage_collector() (bnc#437245)
- dmraid uuid starts with 'DMRAID' (bnc#439439)
- Handle arguments to multipathd from the init file
-------------------------------------------------------------------
Thu Nov 6 17:36:51 CET 2008 - ro@suse.de

View File

@ -27,7 +27,7 @@ Requires: device-mapper kpartx
PreReq: %insserv_prereq %fillup_prereq coreutils grep diffutils
AutoReqProv: on
Version: 0.4.8
Release: 24
Release: 25
Summary: Tools to Manage Multipathed Devices with the device-mapper
Source: multipath-tools-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -53,6 +53,9 @@ Patch18: %{name}-fixup-scsi_id-for-cciss
Patch19: %{name}-sysfs-subdir-reformat
Patch20: %{name}-dont-check-valid-context-in-get_state
Patch21: %{name}-link-directio-against-libaio
Patch22: %{name}-check-for-empty-mpvecs
Patch23: %{name}-dmraid-uuid-in-uppercase
Patch24: %{name}-handle-arguments-from-init-file
%description
This package provides the tools to manage multipathed devices by
@ -115,6 +118,9 @@ Authors:
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%build
make OPTFLAGS="$RPM_OPT_FLAGS"
@ -176,6 +182,10 @@ exit 0
%{_mandir}/man8/kpartx.8*
%changelog
* Mon Nov 10 2008 hare@suse.de
- Check for empty mpvecs in mpvec_garbage_collector() (bnc#437245)
- dmraid uuid starts with 'DMRAID' (bnc#439439)
- Handle arguments to multipathd from the init file
* Thu Nov 06 2008 ro@suse.de
- commenting multiline rpm macros is dangerous (read broken)
remove percent sign in commented macro lines