From af515e5ba55658175a9434d3154396d892b26591 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 11 Feb 2015 12:58:35 +0000 Subject: 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. --- morphlib/plugins/distbuild_plugin.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'morphlib/plugins/distbuild_plugin.py') 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']) -- cgit v1.2.1 From 503517b75c8fc99306e4a852e876fdbca2b79d39 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 11 Feb 2015 12:43:26 +0000 Subject: Fix copyright years --- morphlib/plugins/distbuild_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'morphlib/plugins/distbuild_plugin.py') diff --git a/morphlib/plugins/distbuild_plugin.py b/morphlib/plugins/distbuild_plugin.py index b7298bc0..a7d69472 100644 --- a/morphlib/plugins/distbuild_plugin.py +++ b/morphlib/plugins/distbuild_plugin.py @@ -1,6 +1,6 @@ # distbuild_plugin.py -- Morph distributed build plugin # -# Copyright (C) 2014 Codethink Limited +# Copyright (C) 2014-2015 Codethink Limited # # 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 -- cgit v1.2.1