diff --git a/doc/source/admin/components.rst b/doc/source/admin/components.rst index fc02d79dac..c5427888c5 100644 --- a/doc/source/admin/components.rst +++ b/doc/source/admin/components.rst @@ -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 diff --git a/releasenotes/notes/zookeeper-hosts-4dd0d7c49f3df206.yaml b/releasenotes/notes/zookeeper-hosts-4dd0d7c49f3df206.yaml new file mode 100644 index 0000000000..e6747c7d96 --- /dev/null +++ b/releasenotes/notes/zookeeper-hosts-4dd0d7c49f3df206.yaml @@ -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). diff --git a/zuul/cmd/scheduler.py b/zuul/cmd/scheduler.py index 785d6078fb..67484bf871 100755 --- a/zuul/cmd/scheduler.py +++ b/zuul/cmd/scheduler.py @@ -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)) diff --git a/zuul/cmd/web.py b/zuul/cmd/web.py index ed6b12b0fb..b974a756ec 100755 --- a/zuul/cmd/web.py +++ b/zuul/cmd/web.py @@ -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)