[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.45-75-g5fca52d
Andreas Beckmann
debian at abeckmann.de
Thu Jul 26 12:13:35 UTC 2012
The following commit has been merged in the piatti branch:
commit decb5b5792f6d381d7fe7b417e79b2ddca866274
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sat Jul 7 23:32:30 2012 +0200
p-s: handle master communication exceptions
Handle exceptions in master communication while sending logs,
reserving packages or requesting status. Abort connection and
skip section. Keep the slave running.
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/TODO b/TODO
index f9c807b..0d908f1 100644
--- a/TODO
+++ b/TODO
@@ -11,8 +11,6 @@ for 0.46:
- master controlled recycling (AnBe)
-- slave: robust exception handling while communicating to slave
-
- 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
diff --git a/debian/changelog b/debian/changelog
index 5c12fb9..a286f30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ piuparts (0.46) UNRELEASED; urgency=low
retrying infinitely.
* piuparts-slave.py:
- Fix stopping the currently running test (Ctrl-C Ctrl-C).
+ - Handle master communication exceptions while sending logs or reserving
+ packages: skip the section but keep the slave running.
* piuparts-report.py:
* Simplify running piuparts from GIT.
* Reorganize layout in the GIT repository to reduce path nesting and length.
diff --git a/piuparts-slave.py b/piuparts-slave.py
index dc5679d..edac349 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -379,7 +379,7 @@ class Section:
except MasterIsBusy:
logging.error("master is busy")
self._error_wait_until = time.time() + random.randrange(60, 180)
- except:
+ except (MasterIsCrazy, MasterCommunicationFailed):
logging.error("connection to master failed")
self._error_wait_until = time.time() + 900
else:
@@ -397,6 +397,12 @@ class Section:
pass
self._slave.get_status(self._config.section)
+ except MasterNotOK:
+ logging.error("master did not respond with 'ok'")
+ self._error_wait_until = time.time() + 900
+ except (MasterIsCrazy, MasterCommunicationFailed):
+ logging.error("communication with master failed")
+ self._error_wait_until = time.time() + 900
else:
return True
finally:
--
piuparts git repository
More information about the Piuparts-commits
mailing list