[Piuparts-commits] rev 362 - piatti/home/piupartsm piatti/home/piupartsm/bin piatti/home/piupartss/bin trunk

Holger Levsen holger at alioth.debian.org
Sun Apr 19 11:14:01 UTC 2009


Author: holger
Date: 2009-04-19 11:14:01 +0000 (Sun, 19 Apr 2009)
New Revision: 362

Modified:
   piatti/home/piupartsm/bin/detect_tmp_cruft
   piatti/home/piupartsm/bin/report_untestable_packages
   piatti/home/piupartsm/crontab
   piatti/home/piupartss/bin/slave_run
   trunk/TODO
Log:
fix various syntax and logic errors in monitoring scripts.

Modified: piatti/home/piupartsm/bin/detect_tmp_cruft
===================================================================
--- piatti/home/piupartsm/bin/detect_tmp_cruft	2009-04-18 17:06:16 UTC (rev 361)
+++ piatti/home/piupartsm/bin/detect_tmp_cruft	2009-04-19 11:14:01 UTC (rev 362)
@@ -17,12 +17,12 @@
 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 LS_TMP=$(ls --color=never -l /org/piuparts.debian.org/tmp)
-if [ "$(echo $LS_TMP | wc -l)" -gt 12 ] ; then 
+if [ "$(echo "$LS_TMP" | wc -l)" -gt 12 ] ; then 
 	echo "More than ten directories in /org/piuparts.debian.org/tmp detected!"
 	echo
-	echo $LS_TMP
+	echo "$LS_TMP"
 	echo
 	echo "One is normal for piuparts operation, more is not."
 	echo "Please investigate and cleanup."
 fi
-rm $FILE
+

Modified: piatti/home/piupartsm/bin/report_untestable_packages
===================================================================
--- piatti/home/piupartsm/bin/report_untestable_packages	2009-04-18 17:06:16 UTC (rev 361)
+++ piatti/home/piupartsm/bin/report_untestable_packages	2009-04-19 11:14:01 UTC (rev 362)
@@ -18,12 +18,12 @@
 
 LOGS=$(find /org/piuparts.debian.org/master/*/untestable/ -name "*.log")
 
-if [ "$(wc -l $LOGS)" -gt 0 ] ; then 
+if [ "$(echo "$LOGS" | wc -l )" -gt 0 ] ; then 
 	echo "Untestable packages detected!"
 	echo "This is usually because a package was reserverd with a specific version and then"
         echo "a higher version became available and the reserved version vanished."
 	echo
-	cat $LOGS
+	echo "$LOGS"
 	echo
 	echo "Please investigate and cleanup."
 fi

Modified: piatti/home/piupartsm/crontab
===================================================================
--- piatti/home/piupartsm/crontab	2009-04-18 17:06:16 UTC (rev 361)
+++ piatti/home/piupartsm/crontab	2009-04-19 11:14:01 UTC (rev 362)
@@ -18,7 +18,7 @@
 #
 # make sure slave is reminded daily (and also monitored if not started with ~piupartss/bin/slave_run)
 #
-42 0 * * * rm -f /org/piuparts.debian.org/master/monitor-slave/*
+42 0 * * * rm -f /org/piuparts.debian.org/master/monitor-slave/* ; cp /org/piuparts.debian.org/slave/screenlog.0 /org/piuparts.debian.org/master/monitor-slave/screenlog.new ; chmod -f 775 /org/piuparts.debian.org/master/monitor-slave/screenlog.new
 
 #
 # monitor for problems once a day

Modified: piatti/home/piupartss/bin/slave_run
===================================================================
--- piatti/home/piupartss/bin/slave_run	2009-04-18 17:06:16 UTC (rev 361)
+++ piatti/home/piupartss/bin/slave_run	2009-04-19 11:14:01 UTC (rev 362)
@@ -1,12 +1,35 @@
 #!/bin/sh -x
+
+# Copyright 2009 Holger Levsen (holger at layer-acht.org)
+# 
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+# 
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
 #
 # run piuparts-slave in screen so that a screendump can be mailed via cron to monitor the slave
 #
 set -e
+
+SCREENLOG=/org/piuparts.debian.org/slave/screenlog.0
+MONITORDIR=/org/piuparts.debian.org/master/monitor-slave
+
 cd /org/piuparts.debian.org/slave
 (ps fax|grep -v grep| grep piuparts-slave ) && exit 0
-rm -f /org/piuparts.debian.org/slave/screenlog.0		# used by ~piupartsm/bin/detect_slave_problems
-rm -f /org/piuparts.debian.org/master/monitor-slave/*		# used by several scripts to only warn once a day 
+rm -f $SCREENLOG					# used by ~piupartsm/bin/detect_slave_problems
+rm -f $MONITORDIR/*					# used by several scripts to only warn once a day 
 
 screen -L -d -m -S piuparts-slave-screen su - piupartss -c "cd /org/piuparts.debian.org/slave && python ../share/piuparts/piuparts-slave"
 
+cp $SCREENLOG $MONITORDIR/screenlog.new
+chmod 775 $MONITORDIR/screenlog.new

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2009-04-18 17:06:16 UTC (rev 361)
+++ trunk/TODO	2009-04-19 11:14:01 UTC (rev 362)
@@ -7,8 +7,7 @@
  - refactor code, sources.txt should not be calculated where it currently is
  - get rid of old log pages and put stats in the index page
 - then R
-- include patch for #519192
-- probably include patch for #523950
+- probably include patch for #519192 - not sure if i like that aproach
 - take care of old conf files on upgrades
 - take care of old pyc files from python-central
 - test pipuparts with piuparts before uploading
@@ -26,9 +25,14 @@
   links to http://goldwasser.athome/source/a/addresses-for-gnustep (0.4.7-1).html 
   obviously doesnt exist.
 - bug or feature: udebs turn up as a state ;-) see http://piuparts.debian.org/source/u/udev.html
+- untestable packages are not recognicable as such, see http://piuparts.debian.org/source/a/apache2.html 
+  atm. (log is N/A, even though its there, even if empty) - http://piuparts.debian.org/sid/state-cannot-be-tested.html
+  aint helpful neither.
 
 for 0.37:
 
+- probably include patch for #523950
+
 - report: 
  - write stats about the reasons for failures:
   - installation hangs and uses all cpu when installing with DEBIAN_FRONTEND="noninteractive"




More information about the Piuparts-commits mailing list