Merge "Remove SIGHUP handling in scheduler"

This commit is contained in:
Zuul 2021-02-15 21:06:42 +00:00 committed by Gerrit Code Review
commit dc2df12348
3 changed files with 7 additions and 9 deletions

View File

@ -395,8 +395,7 @@ not read from a git repository. Zuul supports two kinds of reconfigurations.
The full reconfiguration refetches and reloads the configuration of The full reconfiguration refetches and reloads the configuration of
all tenants. To do so, run ``zuul-scheduler full-reconfigure``. For all tenants. To do so, run ``zuul-scheduler full-reconfigure``. For
example this can be used to fix eventual configuration inconsistencies example this can be used to fix eventual configuration inconsistencies
after connection problems to Gerrit/Github. The signal based method by after connection problems to Gerrit/Github.
sending a `SIGHUP` signal to the scheduler PID is deprecated.
The smart reconfiguration reloads only the tenants that changed their The smart reconfiguration reloads only the tenants that changed their
configuration in the tenant config file. To do so, run configuration in the tenant config file. To do so, run

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Signal based triggering of full-reconfiguration in the scheduler
(deprecated since 3.3.0) has been removed. Use ``zuul-scheduler
full-reconfigure`` instead.

View File

@ -66,11 +66,6 @@ class Scheduler(zuul.cmd.ZuulDaemonApp):
except Exception: except Exception:
self.log.exception("Reconfiguration failed:") self.log.exception("Reconfiguration failed:")
def reconfigure_handler(self, signum, frame):
signal.signal(signal.SIGHUP, signal.SIG_IGN)
self.fullReconfigure()
signal.signal(signal.SIGHUP, self.reconfigure_handler)
def exit_handler(self, signum, frame): def exit_handler(self, signum, frame):
self.sched.exit() self.sched.exit()
self.sched.join() self.sched.join()
@ -178,8 +173,6 @@ class Scheduler(zuul.cmd.ZuulDaemonApp):
self.sched.stop() self.sched.stop()
sys.exit(1) sys.exit(1)
signal.signal(signal.SIGHUP, self.reconfigure_handler)
if self.args.nodaemon: if self.args.nodaemon:
signal.signal(signal.SIGTERM, self.exit_handler) signal.signal(signal.SIGTERM, self.exit_handler)
while True: while True: