Merge "Log reconfiguration errors on startup" into feature/zuulv3

This commit is contained in:
Jenkins 2017-02-20 22:40:51 +00:00 committed by Gerrit Code Review
commit 859e5fb1c6
1 changed files with 10 additions and 4 deletions

View File

@ -197,10 +197,16 @@ class Scheduler(zuul.cmd.ZuulApp):
self.sched.setNodepool(nodepool)
self.log.info('Starting scheduler')
self.sched.start()
self.sched.registerConnections(self.connections)
self.sched.reconfigure(self.config)
self.sched.resume()
try:
self.sched.start()
self.sched.registerConnections(self.connections)
self.sched.reconfigure(self.config)
self.sched.resume()
except Exception:
self.log.exception("Error starting Zuul:")
# TODO(jeblair): If we had all threads marked as daemon,
# we might be able to have a nicer way of exiting here.
sys.exit(1)
self.log.info('Starting Webapp')
webapp.start()
self.log.info('Starting RPC')