Skip to content

Commit

Permalink
gear: remove support for custom MASS_DO packet
Browse files Browse the repository at this point in the history
Zuul 2.5 Ansible launcher registered ten of thousands of functions on
each node which, when done serially, took a while.  To alleviate that
issue the Gear protocol had been extended with a custom MASS_DO packet
to register several functions in a single call (see d437159).

The Ansible launcher has been superseeded by the executor server
removing the sole use of MASS_DO.  The extended Gear.Server had not been
cleaned up though.

Replace custom zuul.lib.gearserver.GearServer() with gear.Server() and
remove code.

For posterity, the MASS_DO idea is captured in Gearman upstream issue
tracker:
gearman/gearmand#6

Change-Id: Ifc57f9b7a17d1d9291a535eb0d9f5e1da3713241
  • Loading branch information
hashar committed Jan 29, 2020
1 parent 000f6ec commit 7969b96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 48 deletions.
26 changes: 13 additions & 13 deletions zuul/cmd/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def start_gear_server(self):
if child_pid == 0:
os.close(pipe_write)
self.setup_logging('gearman_server', 'log_config')
import zuul.lib.gearserver
import gear

(statsd_host, statsd_port, statsd_prefix) = get_statsd_config(
self.config)
Expand All @@ -100,18 +100,18 @@ def start_gear_server(self):
ssl_key = get_default(self.config, 'gearman_server', 'ssl_key')
ssl_cert = get_default(self.config, 'gearman_server', 'ssl_cert')
ssl_ca = get_default(self.config, 'gearman_server', 'ssl_ca')
zuul.lib.gearserver.GearServer(port,
ssl_key=ssl_key,
ssl_cert=ssl_cert,
ssl_ca=ssl_ca,
host=host,
statsd_host=statsd_host,
statsd_port=statsd_port,
statsd_prefix=statsd_prefix,
keepalive=True,
tcp_keepidle=300,
tcp_keepintvl=60,
tcp_keepcnt=5)
gear.Server(port,
ssl_key=ssl_key,
ssl_cert=ssl_cert,
ssl_ca=ssl_ca,
host=host,
statsd_host=statsd_host,
statsd_port=statsd_port,
statsd_prefix=statsd_prefix,
keepalive=True,
tcp_keepidle=300,
tcp_keepintvl=60,
tcp_keepcnt=5)

# Keep running until the parent dies:
pipe_read = os.fdopen(pipe_read)
Expand Down
35 changes: 0 additions & 35 deletions zuul/lib/gearserver.py

This file was deleted.

0 comments on commit 7969b96

Please sign in to comment.