diff options
author | James E. Blair <jeblair@redhat.com> | 2017-10-21 08:18:55 -0700 |
---|---|---|
committer | James E. Blair <jeblair@redhat.com> | 2017-10-21 09:45:52 -0700 |
commit | bdd50e6cad7d6d8b96dc9136488195d20b4d416e (patch) | |
tree | 8b5ad2af07a1022cbd7fdd44842215e9818a1aec /zuul/cmd/scheduler.py | |
parent | 6bc104807412a98e545d32253b2363133d4429ae (diff) | |
download | zuul-bdd50e6cad7d6d8b96dc9136488195d20b4d416e.tar.gz |
Add stats for executor and merger count
Report how many executors and mergers are online at any time. Also
report how many executors are accepting new jobs. Report the queues
associated with each.
This could be done in the executor or merger clients rather than
centrally in the scheduler, however, determining how many are online
requires a gear admin function, which is relatively expensive. To
reduce the cost, do it once for the whole system in the scheduler.
The scheduler doesn't directly have a gearman connection (though its
associated rpc listener, merge client, and executor clients do).
It didn't seem necessary to add another client for this, and the
rpc listener seemed the most appropriate connection to borrow (it's
purpose is to expose scheduler functions over gearman). The method
to count functions is added to it, and it in turn is now started
directly from the scheduler.
Change-Id: I09659c29431ebac7ecd1869cc4c1356026c03d26
Diffstat (limited to 'zuul/cmd/scheduler.py')
-rwxr-xr-x | zuul/cmd/scheduler.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/zuul/cmd/scheduler.py b/zuul/cmd/scheduler.py index d920d8e56..2d71f4d08 100755 --- a/zuul/cmd/scheduler.py +++ b/zuul/cmd/scheduler.py @@ -141,7 +141,6 @@ class Scheduler(zuul.cmd.ZuulApp): import zuul.merger.client import zuul.nodepool import zuul.webapp - import zuul.rpclistener import zuul.zk signal.signal(signal.SIGUSR2, zuul.cmd.stack_dump_handler) @@ -174,7 +173,6 @@ class Scheduler(zuul.cmd.ZuulApp): webapp = zuul.webapp.WebApp( self.sched, port=port, cache_expiry=cache_expiry, listen_address=listen_address) - rpc = zuul.rpclistener.RPCListener(self.config, self.sched) self.configure_connections() self.sched.setExecutor(gearman) @@ -195,8 +193,6 @@ class Scheduler(zuul.cmd.ZuulApp): sys.exit(1) self.log.info('Starting Webapp') webapp.start() - self.log.info('Starting RPC') - rpc.start() signal.signal(signal.SIGHUP, self.reconfigure_handler) signal.signal(signal.SIGUSR1, self.exit_handler) |