[Piuparts-commits] rev 928 - piatti/org/piuparts.debian.org/etc trunk trunk/debian

Holger Levsen holger at alioth.debian.org
Tue Jul 12 13:12:04 UTC 2011


Author: holger
Date: 2011-07-12 13:12:04 +0000 (Tue, 12 Jul 2011)
New Revision: 928

Modified:
   piatti/org/piuparts.debian.org/etc/piuparts.conf.piatti
   trunk/README.txt
   trunk/TODO
   trunk/debian/changelog
   trunk/piuparts-slave.py
Log:
  - turn MAX_AGE_TGZ into a configuration option
  - document new configuration option max-tgz-age in README.txt.



Modified: piatti/org/piuparts.debian.org/etc/piuparts.conf.piatti
===================================================================
--- piatti/org/piuparts.debian.org/etc/piuparts.conf.piatti	2011-07-11 13:00:26 UTC (rev 927)
+++ piatti/org/piuparts.debian.org/etc/piuparts.conf.piatti	2011-07-12 13:12:04 UTC (rev 928)
@@ -11,7 +11,10 @@
 master-user = piupartsm
 master-directory = /org/piuparts.debian.org/master/
 output-directory = /org/piuparts.debian.org/htdocs/
+# 30*60
 idle-sleep = 1800
+# 60*60*24*30
+max-tgz-age = 2592000
 
 [sid]
 description = Debian sid / main: package installation, removal and purge test.

Modified: trunk/README.txt
===================================================================
--- trunk/README.txt	2011-07-11 13:00:26 UTC (rev 927)
+++ trunk/README.txt	2011-07-12 13:12:04 UTC (rev 928)
@@ -353,11 +353,13 @@
 ==== global configuration
 
 These settings are used for all sections. Except for the first
-two they are all mandatory:
+three they are all mandatory:
 
 * "sections" defaults to sid and defines which sections should be processed in master-slave mode. Each section defined here has to have a section with the section specific settings explained below. The first section defined should always be sid, because the data from first section a package is in is used for the source package html report.
 
 * "idle-sleep" is the length of time the slave should wait before querying the master again if the master didn't have any new packages to test. In seconds, so a value of 300 would mean five minutes, and that seems to be a good value when there are fairly few slaves per master. The default is 300 seconds.
+
+* "max-tgz-age" is used to specify the maximum age (in seconds) after which basesystem tarballs will be recreated. If recreation fails, the old tarball will be used again. The default is 2592000 seconds, which is 30 days.
   
 * "master-host" is the host where the master exists. The slave will give this host to ssh.
   

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2011-07-11 13:00:26 UTC (rev 927)
+++ trunk/TODO	2011-07-12 13:12:04 UTC (rev 928)
@@ -6,7 +6,7 @@
 
 for 0.41
 
-- piuparts-slave: make MAX_TGZ_AGE configurable
+- the slave should only try to recreate the tarball once a day
 - fix "DeprecationWarning: os.popen2 is deprecated.  Use the subprocess module."
 
 for 0.42:

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2011-07-11 13:00:26 UTC (rev 927)
+++ trunk/debian/changelog	2011-07-12 13:12:04 UTC (rev 928)
@@ -32,10 +32,11 @@
       "--dpkg-noforce-unsafe-io" to disable this feature. (Closes: #633033)
       Thanks to Scott once more!
   * piuparts-slave: 
-    - check if chroot-tgz is older than MAX_TGZ_AGE (currently
-      hardcoded to 30) and recreate it, if it is. Keep backup and put in back
+    - check if chroot-tgz is older than max-tgz-age (defaulting to 30 days)
+      and recreate it, if it is. Keep backup and put in back
       in place when debootstrapping a new chroot-tgz fails. Thanks to Scott
       Schaefer for the patch. (Closes: #632924)
+    - document new configuration option max-tgz-age in README.txt.
     - fix bug in piuparts-slave which prevented running a single section by 
       including section name as command-line argument - thanks again to Scott
       and see 632924 too.
@@ -44,7 +45,7 @@
     - add X-Python-Version: pseudo-header
   * debian/rules: use dh_python2 instead of python-support to build the 
     package
-  * Makefile: build for python 2.6 and 2.7 instead of 2.5 and 2.6  
+  * Makefile: build for python 2.6 and 2.7 instead of 2.5 and 2.6.
 
  -- Holger Levsen <holger at debian.org>  Sat, 25 Jun 2011 23:33:49 +0200
 

Modified: trunk/piuparts-slave.py
===================================================================
--- trunk/piuparts-slave.py	2011-07-11 13:00:26 UTC (rev 927)
+++ trunk/piuparts-slave.py	2011-07-12 13:12:04 UTC (rev 928)
@@ -35,7 +35,6 @@
 
 
 CONFIG_FILE = "/etc/piuparts/piuparts.conf"
-MAX_TGZ_AGE = 60*60*24*30
 
 
 def setup_logging(log_level, log_file_name):
@@ -63,6 +62,7 @@
                 "sections": "slave",
                 "slave-directory": section,
                 "idle-sleep": "300",
+                "max-tgz-age": "2592000",
                 "master-host": None,
                 "master-user": None,
                 "master-directory": ".",
@@ -224,7 +224,7 @@
         if not os.path.exists(self._slave_directory):
             os.mkdir(self._slave_directory)
 
-    def setup(self, master_host, master_user, master_directory, idle_sleep):
+    def setup(self, master_host, master_user, master_directory, max_tgz_age):
         if self._config["debug"] in ["yes", "true"]:
             self._logger = logging.getLogger()
             self._logger.setLevel(logging.DEBUG)
@@ -238,12 +238,12 @@
         tarball = self._config["chroot-tgz"]
         if tarball:
             create_or_replace_chroot_tgz(self._config, tarball,
-                       MAX_TGZ_AGE, self._config["distro"])
+                       max_tgz_age, self._config["distro"])
 
         tarball = self._config["upgrade-test-chroot-tgz"]
         if self._config["upgrade-test-distros"] and tarball: 
             create_or_replace_chroot_tgz(self._config, tarball,
-                       MAX_TGZ_AGE, self._config["upgrade-test-distros"].split()[0])
+                       max_tgz_age, self._config["upgrade-test-distros"].split()[0])
     
         for rdir in ["new", "pass", "fail"]:
             rdir = os.path.join(self._slave_directory, rdir)
@@ -255,7 +255,6 @@
         self._slave.set_master_user(master_user)
         self._slave.set_master_directory(master_directory)
         self._slave.set_master_command(self._config["master-command"])
-        self._idle_sleep=idle_sleep
         self._log_file=self._config["log-file"]
 
         for rdir in ["pass", "fail", "untestable", "reserved"]:
@@ -475,7 +474,7 @@
     sections = []
     for section_name in section_names:
         section = Section(section_name)
-        section.setup(master_host=global_config["master-host"],master_user=global_config["master-user"],master_directory=global_config["master-directory"],idle_sleep=global_config["idle-sleep"])
+        section.setup(master_host=global_config["master-host"],master_user=global_config["master-user"],master_directory=global_config["master-directory"],max_tgz_age=global_config["max-tgz-age"])
         sections.append(section)
 
     while True:




More information about the Piuparts-commits mailing list