[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-35-g3633050
Andreas Beckmann
debian at abeckmann.de
Wed Jun 27 20:03:59 UTC 2012
The following commit has been merged in the develop branch:
commit 83da741ffe1d564344b54b18db0d60a26b104ca9
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Mon Jun 25 23:35:40 2012 +0200
p-m: ignore duplicate log submissions
accept and discard duplicate log submissions and send an "ok" to the
slave, otherwise it will retry sending the logfile forever
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/TODO b/TODO
index 0d8e1c1..f9c807b 100644
--- a/TODO
+++ b/TODO
@@ -13,9 +13,6 @@ for 0.46:
- slave: robust exception handling while communicating to slave
-- master: duplicate log submission handling
- break the slave: send -> master: reject infinite loop
-
- make piuparts-master + piuparts-slave packages work out-of-the-box
- ship sane minimal sudoers in p-s.deb than can be enabled by default
@@ -89,6 +86,7 @@ for 0.47:
- "decorate" (strike-through) bug links generated by piuparts-analyze
to indicate resolved state (take package version into account!)
+
- find_default_debian_mirrors: if parts[2] contains a / (think
stable/updates for security.d.o), you can't ignore this, it
will break later...
diff --git a/debian/changelog b/debian/changelog
index 663d014..494bc73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ piuparts (0.46) UNRELEASED; urgency=low
+ /var/lib/cdebconf/{questions,templates}.dat-old
* piupartslib/packagesdb.py:
* piuparts-master.py:
+ - Accept and discard duplicate log submissions, preventing the slave from
+ retrying infinitely.
* piuparts-slave.py:
- Fix stopping the currently running test (Ctrl-C Ctrl-C).
* piuparts-report.py:
diff --git a/piuparts-master.py b/piuparts-master.py
index aed48fd..9ebae6a 100644
--- a/piuparts-master.py
+++ b/piuparts-master.py
@@ -31,6 +31,7 @@ import fcntl
import time
import piupartslib
+from piupartslib.packagesdb import LogfileExists
CONFIG_FILE = "/etc/piuparts/piuparts.conf"
@@ -181,19 +182,31 @@ class Master(Protocol):
def _pass(self, command, args):
self._check_args(2, command, args)
log = self._read_long_part()
- self._binary_db.pass_package(args[0], args[1], log)
+ try:
+ self._binary_db.pass_package(args[0], args[1], log)
+ except LogfileExists:
+ logging.info("Ignoring duplicate submission: %s %s %s"
+ % ("pass", args[0], args[1]))
self._short_response("ok")
def _fail(self, command, args):
self._check_args(2, command, args)
log = self._read_long_part()
- self._binary_db.fail_package(args[0], args[1], log)
+ try:
+ self._binary_db.fail_package(args[0], args[1], log)
+ except LogfileExists:
+ logging.info("Ignoring duplicate submission: %s %s %s"
+ % ("fail", args[0], args[1]))
self._short_response("ok")
def _untestable(self, command, args):
self._check_args(2, command, args)
log = self._read_long_part()
- self._binary_db.make_package_untestable(args[0], args[1], log)
+ try:
+ self._binary_db.make_package_untestable(args[0], args[1], log)
+ except LogfileExists:
+ logging.info("Ignoring duplicate submission: %s %s %s"
+ % ("untestable", args[0], args[1]))
self._short_response("ok")
def main():
--
piuparts git repository
More information about the Piuparts-commits
mailing list