summaryrefslogtreecommitdiff
path: root/morphlib/plugins/distbuild_plugin.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-02-11 12:58:35 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-02-11 13:20:02 +0000
commitaf515e5ba55658175a9434d3154396d892b26591 (patch)
tree3ff20d95fc9cd2b7fb5ad56d5fb0099a0f5c27a2 /morphlib/plugins/distbuild_plugin.py
parent1ce2492256af256e1076f0e88402e8e1d8a271f2 (diff)
downloadmorph-af515e5ba55658175a9434d3154396d892b26591.tar.gz
distbuild: Refuse to start controller if there are no workers listed
This is another situation where builds could hang forever if the server is misconfigured. Longer term, workers should be able to come and go dynamically without needing to reconfigure and restart the controller process.
Diffstat (limited to 'morphlib/plugins/distbuild_plugin.py')
-rw-r--r--morphlib/plugins/distbuild_plugin.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/plugins/distbuild_plugin.py b/morphlib/plugins/distbuild_plugin.py
index 66d86dcf..b7298bc0 100644
--- a/morphlib/plugins/distbuild_plugin.py
+++ b/morphlib/plugins/distbuild_plugin.py
@@ -238,6 +238,11 @@ class ControllerDaemon(cliapp.Plugin):
distbuild.add_crash_conditions(self.app.settings['crash-condition'])
+ if not self.app.settings['worker']:
+ raise cliapp.AppException(
+ 'Distbuild controller has no workers configured. Refusing to '
+ 'start.')
+
artifact_cache_server = (
self.app.settings['artifact-cache-server'] or
self.app.settings['cache-server'])