Merge "Remove default zookeeper hosts"

This commit is contained in:
Zuul 2019-03-12 01:16:11 +00:00 committed by Gerrit Code Review
commit d0569f0214
4 changed files with 12 additions and 7 deletions

View File

@ -143,10 +143,6 @@ The following sections of ``zuul.conf`` are used by all Zuul components:
If present, this will be prefixed to all of the keys before
transmitting to the statsd server.
.. NOTE: this is a white lie at this point, since only the scheduler
uses this, however, we expect other components to use it later, so
it's reasonable for admins to plan for this now.
.. attr:: zookeeper
Client connection information for ZooKeeper

View File

@ -0,0 +1,6 @@
---
upgrade:
- The ``hosts`` value in the ``[zookeeper]`` configuration section
previously defaulted to ``localhost:2181``, but now is unset by
default. This value is required and must be explicitly set (and
the documentation has always indicated this).

View File

@ -137,8 +137,9 @@ class Scheduler(zuul.cmd.ZuulDaemonApp):
nodepool = zuul.nodepool.Nodepool(self.sched)
zookeeper = zuul.zk.ZooKeeper()
zookeeper_hosts = get_default(self.config, 'zookeeper',
'hosts', '127.0.0.1:2181')
zookeeper_hosts = get_default(self.config, 'zookeeper', 'hosts', None)
if not zookeeper_hosts:
raise Exception("The zookeeper hosts config value is required")
zookeeper_timeout = float(get_default(self.config, 'zookeeper',
'session_timeout', 10.0))

View File

@ -65,7 +65,9 @@ class WebServer(zuul.cmd.ZuulDaemonApp):
sys.exit(1)
params["zk_hosts"] = get_default(
self.config, 'zookeeper', 'hosts', '127.0.0.1:2181')
self.config, 'zookeeper', 'hosts', None)
if not params["zk_hosts"]:
raise Exception("The zookeeper hosts config value is required")
try:
self.web = zuul.web.ZuulWeb(**params)