[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.49-105-gac1319a
Andreas Beckmann
anbe at debian.org
Fri Mar 1 15:32:50 UTC 2013
The following commit has been merged in the piatti branch:
commit f2b71e0c166d3757d58798ae58e27265511c2092
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Feb 10 01:23:02 2013 +0100
detect_slave_problems: use idle-sleep from piuparts.conf
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/debian/changelog b/debian/changelog
index 2eb68a5..84035be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,7 @@ piuparts (0.50) UNRELEASED; urgency=low
* detect_tmp_cruft: Move to slave-bin and run from slave crontab.
* detect_slave_problems:
- Move to slave-bin and run from slave crontab.
+ - Use idle-sleep setting from piuparts.conf.
-- Andreas Beckmann <debian at abeckmann.de> Tue, 15 Jan 2013 11:51:43 +0100
diff --git a/slave-bin/detect_slave_problems b/slave-bin/detect_slave_problems
index 3349007..503258b 100755
--- a/slave-bin/detect_slave_problems
+++ b/slave-bin/detect_slave_problems
@@ -60,6 +60,7 @@ fi
get_config_value MASTER global master-directory
+get_config_value IDLE_SLEEP global idle-sleep 1800
SCREENLOG=$MASTER/../slave/screenlog.0
@@ -71,11 +72,12 @@ cd $MONITORDIR
chown piupartsm:piuparts $MONITORDIR
chmod 775 $MONITORDIR
-difference=$(file_age $SCREENLOG)
-
-# dont complain, if already complained and screenlog is younger than 31 min (=1800 sec) - the slave likes to sleep that long
-# FIXME: parse config file for duration...
-if [ ! -f $LOCKFILE ] && [ ${difference} -ge 1860 ] ; then
+# Only complain if screenlog is older than $IDLE_SPEEP + 1 minute (the slave
+# likes to sleep that long) and the problem is new or was not reported within
+# the previous 24 hours.
+if [ $(file_age $SCREENLOG) -le $(($IDLE_SLEEP + 60)) ]; then
+ rm -f $LOCKFILE
+elif [ ! -f $LOCKFILE ]; then
{
echo "Either a test is running for a very long time (but no test"
echo "should run longer than an hour), piuparts-slave hangs or is"
--
piuparts git repository
More information about the Piuparts-commits
mailing list