Specify gearman server listen address with separate option
Recently the ability for the gearman server to listen on a specific
address was added, but it simply re-used the address already in the
config file. That might be fine for some cases, but it's strange
for the case where you want it listening on all addresses but
connecting to localhost.
Add a new listen_address for the gearman_server config section
so that the listen and connect addresses can be supplied separately.
Change-Id: Id23adb90145984e74ea4372ef4672fc06c7afa90
diff --git a/zuul/cmd/server.py b/zuul/cmd/server.py
index a3a23ad..d7ac57d 100755
--- a/zuul/cmd/server.py
+++ b/zuul/cmd/server.py
@@ -118,8 +118,12 @@
import gear
statsd_host = os.environ.get('STATSD_HOST')
statsd_port = int(os.environ.get('STATSD_PORT', 8125))
+ if self.config.has_option('gearman_server', 'listen_address'):
+ host = self.config.get('gearman_server', 'listen_address')
+ else:
+ host = None
gear.Server(4730,
- host=self.config.get('gearman', 'server'),
+ host=host,
statsd_host=statsd_host,
statsd_port=statsd_port,
statsd_prefix='zuul.geard')