Don't reload connections on HUP

Previous to the connection work zuul wouldn't stop triggers or therefore
the gerrit watcher on reload.

Reloading the gerrit connection causes challenges for the cache
management which are currently not handled and likely affecting memory
usage.

Rather than support dynamically reloading all of zuul.conf, just reload
the layout and logging and require a full restart for connection
changes to take effect.

This isn't a feature regression as particular changes to zuul.conf
weren't previously picked up (for example, gerrit credentials).

Change-Id: Iff77fbca6ab15c9636f6ae8f12bc1bad78f79aa9
This commit is contained in:
Joshua Hesketh 2016-02-17 21:04:18 +11:00
parent dc963fc37b
commit c4997159bb
2 changed files with 2 additions and 6 deletions

View File

@ -997,9 +997,8 @@ normal operation, omit ``-d`` and let Zuul run as a daemon.
If you send signal 1 (SIGHUP) to the zuul-server process, Zuul will
stop executing new jobs, wait until all executing jobs are finished,
reload its configuration, and resume. Any values in any of the
configuration files may be changed, except the location of Zuul's PID
file (a change to that will be ignored until Zuul is restarted).
reload its layout.yaml, and resume. Changes to any connections or
the PID file will be ignored until Zuul is restarted.
If you send a SIGUSR1 to the zuul-server process, Zuul will stop
executing new jobs, wait until all executing jobs are finished,

View File

@ -61,12 +61,9 @@ class Server(zuul.cmd.ZuulApp):
def reconfigure_handler(self, signum, frame):
signal.signal(signal.SIGHUP, signal.SIG_IGN)
self.log.debug("Reconfiguration triggered")
self.sched.stopConnections()
self.read_config()
self.setup_logging('zuul', 'log_config')
try:
self.configure_connections()
self.sched.registerConnections(self.connections)
self.sched.reconfigure(self.config)
except Exception:
self.log.exception("Reconfiguration failed:")