Your message dated Fri, 30 Jul 2010 10:07:10 +0000
with message-id <[email protected]>
and subject line Bug#590691: fixed in mpt-status 1.2.0-7
has caused the Debian Bug report #590691,
regarding mpt-status: set -e stanza avoids update of statusfile
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
590691: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590691
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mpt-status
Version: 1.2.0-6
Severity: normal
At line 15 of /etc/init.d/mpt-statusd in mpt-status 1.2.0-6
is included the bash internal command:
set -e
Code around line 67 of /etc/init.d/mpt-statusd in mpt-status 1.2.0-6 is:
if [ true = "$BADRAID" ] ; then
# RAID not OK
(mpt-status -i $ID) > $STATUSFILE.new
if [ ! -f $STATUSFILE ] ; then # RAID just became broken
When any abnormal condition is detected by mpt-status, its return code is non-
zero.
This exits immediately the pipeline intended to update the $STATUSFILE.new
file,
aborting the whole check_mpt loop.
The quickest (and poorest) workaround is enclosing the test line in a sort of
jail,
to immunize the outer script from exiting while a real abnormal condition is
detected
if [ true = "$BADRAID" ] ; then
# RAID not OK
set +e
(mpt-status -i $ID) > $STATUSFILE.new
set -e
if [ ! -f $STATUSFILE ] ; then # RAID just became broken
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-trunk-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 mpt-status depends on:
ii daemon 0.6.4-1 turns other processes into daemons
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
mpt-status recommends no packages.
Versions of packages mpt-status suggests:
ii bsd-mailx [mailx] 8.1.2-0.20100314cvs-1 simple mail user agent
ii heirloom-mailx [ma 12.4-2 feature-rich BSD mail(1)
-- Configuration Files:
/etc/init.d/mpt-statusd changed:
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC="mpt-status monitor"
NAME=mpt-statusd
PIDFILE=/var/run/$NAME.pid
STATUSFILE=/var/run/$NAME.status
SCRIPTNAME=/etc/init.d/$NAME
MAILTO=root # Where to report problems
PERIOD=600 # Seconds between each check (default 10 minutes)
REMIND=7200 # Seconds between each reminder (default 2 hours)
RUN_DAEMON=yes
ID=0
[ -e /etc/default/mpt-statusd ] && . /etc/default/mpt-statusd
test -x /usr/sbin/mpt-status || exit 0
. /lib/lsb/init-functions
[ -e /etc/default/rcS ] && . /etc/default/rcS
if [ $RUN_DAEMON = "no" ] ; then
log_begin_msg "mpt-statusd is disabled in /etc/default/mpt-statusd, not
starting."
log_end_msg 0
exit 0
fi
if ! [ -e "/proc/mpt/version" ] ; then
log_failure_msg "The mptctl module is missing. Please have a look at
the README.Debian.gz."
log_end_msg 0
exit 0
fi
check_mpt() {
echo $$ > $PIDFILE.new && mv $PIDFILE.new $PIDFILE
while true ; do
# Check ever $PERIOD seconds, send email on every status
# change and repeat ever $REMIND seconds if the raid is still
# bad.
if (mpt-status -i $ID) |grep -q 'state OPTIMAL' ; then
BADRAID=false
else
BADRAID=true
logger -t mpt-statusd "detected non-optimal RAID status"
fi
STATUSCHANGE=false
if [ true = "$BADRAID" ] ; then
# RAID not OK
set +e
(mpt-status -i $ID) > $STATUSFILE.new
set -e
if [ ! -f $STATUSFILE ] ; then # RAID just became broken
STATUSCHANGE=true
mv $STATUSFILE.new $STATUSFILE
elif cmp -s $STATUSFILE $STATUSFILE.new ; then
# No change. Should we send reminder?
LASTTIME="`stat -c '%Z' $STATUSFILE`"
NOW="`date +%s`"
SINCELAST="`expr $NOW - $LASTTIME`"
if [ $REMIND -le "$SINCELAST" ]; then
# Time to send reminder
STATUSCHANGE=true
mv $STATUSFILE.new $STATUSFILE
else
rm $STATUSFILE.new
fi
else
STATUSCHANGE=true
mv $STATUSFILE.new $STATUSFILE
fi
else
# RAID OK
if [ -f $STATUSFILE ] ; then
rm $STATUSFILE
STATUSCHANGE=true
fi
fi
if [ true = "$STATUSCHANGE" ]; then
hostname="`uname -n`"
(
cat <<EOF
This is a RAID status update from mpt-statusd. The mpt-status
program reports that one of the RAIDs changed state:
EOF
if [ -f $STATUSFILE ] ; then
cat $STATUSFILE
else
(mpt-status -i $ID)
fi
echo
echo "Report from $0 on $hostname"
) | mail -s "info: mpt raid status change on $hostname" $MAILTO
fi
sleep $PERIOD
done
}
check_daemon() {
# Let's check if there is a daemon which is really running and not
timing out
DAEMON_RUN=`ps aux | grep "/etc/init.d/mpt-statusd check_mpt" | grep -v
grep | grep -v daemon`
if [ -n "$DAEMON_RUN" ] ; then
return 1;
else
return 0;
fi
}
d_start() {
[ -f $PIDFILE ] && PID="`cat $PIDFILE`"
if [ "$PID" ] ; then
log_progress_msg "Daemon already running. Refusing to start another"
return 0
elif check_daemon ; then
# Use the daemon package to turn this script into a daemon
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--oknodo --exec /usr/bin/daemon /usr/bin/daemon $SCRIPTNAME
check_mpt
return 0
else
log_progress_msg "Daemon is already running. Refusing to start another"
return 0
fi
}
d_stop() {
if [ -f $PIDFILE ] ; then
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE
rm -f $PIDFILE
return 0
else
log_progress_msg "Daemon is already stopped."
return 0
fi
}
d_stop_by_restart() {
if [ -f $PIDFILE ] ; then
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE
rm -f $PIDFILE
log_end_msg 0
else
log_progress_msg "Daemon is already stopped."
log_end_msg 0
fi
}
case "$1" in
start)
echo -n ""
log_begin_msg "Starting $DESC: $NAME"
d_start ; CODE=$?
log_end_msg $CODE
;;
stop)
log_begin_msg "Stopping $DESC: $NAME"
d_stop ; CODE=$?
log_end_msg $CODE
;;
check_mpt)
check_mpt
;;
restart|force-reload)
log_begin_msg "Restarting $DESC: $NAME"
d_stop_by_restart
sleep 1
d_start || CODE=$?
log_end_msg $CODE
;;
*)
# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: mpt-status
Source-Version: 1.2.0-7
We believe that the bug you reported is fixed in the latest version of
mpt-status, which is due to be installed in the Debian FTP archive:
mpt-status_1.2.0-7.debian.tar.gz
to main/m/mpt-status/mpt-status_1.2.0-7.debian.tar.gz
mpt-status_1.2.0-7.dsc
to main/m/mpt-status/mpt-status_1.2.0-7.dsc
mpt-status_1.2.0-7_amd64.deb
to main/m/mpt-status/mpt-status_1.2.0-7_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Stefan Bauer <[email protected]> (supplier of updated mpt-status package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Wed, 28 Jul 2010 19:46:56 +0200
Source: mpt-status
Binary: mpt-status
Architecture: source amd64
Version: 1.2.0-7
Distribution: unstable
Urgency: low
Maintainer: Stefan Bauer <[email protected]>
Changed-By: Stefan Bauer <[email protected]>
Description:
mpt-status - get RAID status out of mpt (and other) HW RAID controllers
Closes: 586152 590691
Changes:
mpt-status (1.2.0-7) unstable; urgency=low
.
* Remove set -e stanza from init-script to not interrupt update of
Raid-Controller statusfile (Closes: #590691)
* Extend init script to suppress warnings if mpt-status is already
terminated (Closes: #586152)
* Bump Standards to 3.9.1.0
Checksums-Sha1:
f560b6643a1dc922de03c01cc8e433939e8faf46 1018 mpt-status_1.2.0-7.dsc
e2234346abe645668eb72bae080ee16b2f01099d 48450 mpt-status_1.2.0-7.debian.tar.gz
5d93e8562be43e8d3e915d3002864794cc2776ee 28024 mpt-status_1.2.0-7_amd64.deb
Checksums-Sha256:
a5e96cba2a18d6d13ac232ace806adc3e2abc03c14b4ed51c91b157daafac34d 1018
mpt-status_1.2.0-7.dsc
65c52bb900f5dd08f6145686b6f3e77bcd94b8a6664db53eb85d4fa3da2ae9d9 48450
mpt-status_1.2.0-7.debian.tar.gz
e5147711c912ba16a1d329b6dfef3eabf97529eae47ed7d047ee60aab1fa454c 28024
mpt-status_1.2.0-7_amd64.deb
Files:
0f93f838f21dde08736b9ea9c3bde975 1018 admin extra mpt-status_1.2.0-7.dsc
18897cdd77a3ecbea13ca13d53b40796 48450 admin extra
mpt-status_1.2.0-7.debian.tar.gz
110f7c2b8dd8cfad62e6bae0e304f9ec 28024 admin extra mpt-status_1.2.0-7_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkxSnSIACgkQvx6dH3bVKsRwCACfXYE0XnxWnRr+mL7v+mfdJire
ecwAoOr/HBL/Reo7Df53Gg/1XsxpTjMN
=jikU
-----END PGP SIGNATURE-----
--- End Message ---