Log reconfiguration errors on startup

Change-Id: I5fd39388856faad229085c9832ac693e79f13ec9
This commit is contained in:
James E. Blair 2017-02-20 17:27:40 -05:00
parent e316202629
commit 99f9310ace
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')