diff options
author | Zuul <zuul@review.openstack.org> | 2018-01-17 05:47:06 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-01-17 05:47:06 +0000 |
commit | 168a94117b30d9fbf79374c6f6c52be88bc5b8d7 (patch) | |
tree | 024ece895057e6c562cdc70defe706840ea38f48 /zuul | |
parent | f641f8b8f268d50a759072c67d1c8c0aa25ae580 (diff) | |
parent | 30cbb65b4315820b89333e3683e4c350ec173a81 (diff) | |
download | zuul-168a94117b30d9fbf79374c6f6c52be88bc5b8d7.tar.gz |
Merge "Centrally register stack dump handler" into feature/zuulv3
Diffstat (limited to 'zuul')
-rwxr-xr-x | zuul/cmd/__init__.py | 4 | ||||
-rwxr-xr-x | zuul/cmd/executor.py | 2 | ||||
-rwxr-xr-x | zuul/cmd/merger.py | 2 | ||||
-rwxr-xr-x | zuul/cmd/scheduler.py | 1 | ||||
-rwxr-xr-x | zuul/cmd/web.py | 2 |
5 files changed, 4 insertions, 7 deletions
diff --git a/zuul/cmd/__init__.py b/zuul/cmd/__init__.py index 07d4a8d08..6d1f8625f 100755 --- a/zuul/cmd/__init__.py +++ b/zuul/cmd/__init__.py @@ -176,6 +176,10 @@ class ZuulDaemonApp(ZuulApp): pid_fn = self.getPidFile() pid = pid_file_module.TimeoutPIDLockFile(pid_fn, 10) + # Early register the stack dump handler for all zuul apps. This makes + # it possible to also gather stack dumps during startup hangs. + signal.signal(signal.SIGUSR2, stack_dump_handler) + if self.args.nodaemon: self.run() else: diff --git a/zuul/cmd/executor.py b/zuul/cmd/executor.py index aa7a106b5..b050a5979 100755 --- a/zuul/cmd/executor.py +++ b/zuul/cmd/executor.py @@ -109,8 +109,6 @@ class Executor(zuul.cmd.ZuulDaemonApp): log_streaming_port=self.finger_port) self.executor.start() - signal.signal(signal.SIGUSR2, zuul.cmd.stack_dump_handler) - if self.args.nodaemon: signal.signal(signal.SIGTERM, self.exit_handler) while True: diff --git a/zuul/cmd/merger.py b/zuul/cmd/merger.py index 2916a0b3c..8c4798923 100755 --- a/zuul/cmd/merger.py +++ b/zuul/cmd/merger.py @@ -62,8 +62,6 @@ class Merger(zuul.cmd.ZuulDaemonApp): self.connections) self.merger.start() - signal.signal(signal.SIGUSR2, zuul.cmd.stack_dump_handler) - if self.args.nodaemon: signal.signal(signal.SIGTERM, self.exit_handler) while True: diff --git a/zuul/cmd/scheduler.py b/zuul/cmd/scheduler.py index d94e9ea17..7748a80a7 100755 --- a/zuul/cmd/scheduler.py +++ b/zuul/cmd/scheduler.py @@ -123,7 +123,6 @@ class Scheduler(zuul.cmd.ZuulDaemonApp): import zuul.webapp import zuul.zk - signal.signal(signal.SIGUSR2, zuul.cmd.stack_dump_handler) if (self.config.has_option('gearman_server', 'start') and self.config.getboolean('gearman_server', 'start')): self.start_gear_server() diff --git a/zuul/cmd/web.py b/zuul/cmd/web.py index 4687de653..ad3062ff0 100755 --- a/zuul/cmd/web.py +++ b/zuul/cmd/web.py @@ -106,8 +106,6 @@ class WebServer(zuul.cmd.ZuulDaemonApp): self.configure_connections() - signal.signal(signal.SIGUSR2, zuul.cmd.stack_dump_handler) - try: self._run() except Exception: |