summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2019-02-07 12:35:56 -0800
committerJames E. Blair <jeblair@redhat.com>2019-03-07 07:49:52 -0800
commita6b48d640c40a1618368c6a892d5d3d03f1741fd (patch)
treea0c51d95837874ba27df422592152f9773cd77ed
parent27f872fb56d3c2859ae29e252b08d8076a630ed3 (diff)
Remove default zookeeper hosts
This default is unlikely to be correct and has caused confusion for us in the past. Remove it (which matches the documentation). Change-Id: I3453b0e918fb1c6783514c470f40f4e973fd683a
Notes
Notes (review): Code-Review+2: Monty Taylor <mordred@inaugust.com> Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Workflow+1: Tobias Henkel <tobias.henkel@bmw.de> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 12 Mar 2019 01:16:11 +0000 Reviewed-on: https://review.openstack.org/635633 Project: openstack-infra/zuul Branch: refs/heads/master
-rw-r--r--doc/source/admin/components.rst4
-rw-r--r--releasenotes/notes/zookeeper-hosts-4dd0d7c49f3df206.yaml6
-rwxr-xr-xzuul/cmd/scheduler.py5
-rwxr-xr-xzuul/cmd/web.py4
4 files changed, 12 insertions, 7 deletions
diff --git a/doc/source/admin/components.rst b/doc/source/admin/components.rst
index fc02d79..c542788 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:
143 If present, this will be prefixed to all of the keys before 143 If present, this will be prefixed to all of the keys before
144 transmitting to the statsd server. 144 transmitting to the statsd server.
145 145
146.. NOTE: this is a white lie at this point, since only the scheduler
147 uses this, however, we expect other components to use it later, so
148 it's reasonable for admins to plan for this now.
149
150.. attr:: zookeeper 146.. attr:: zookeeper
151 147
152 Client connection information for ZooKeeper 148 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 0000000..e6747c7
--- /dev/null
+++ b/releasenotes/notes/zookeeper-hosts-4dd0d7c49f3df206.yaml
@@ -0,0 +1,6 @@
1---
2upgrade:
3 - The ``hosts`` value in the ``[zookeeper]`` configuration section
4 previously defaulted to ``localhost:2181``, but now is unset by
5 default. This value is required and must be explicitly set (and
6 the documentation has always indicated this).
diff --git a/zuul/cmd/scheduler.py b/zuul/cmd/scheduler.py
index 785d607..67484bf 100755
--- a/zuul/cmd/scheduler.py
+++ b/zuul/cmd/scheduler.py
@@ -137,8 +137,9 @@ class Scheduler(zuul.cmd.ZuulDaemonApp):
137 nodepool = zuul.nodepool.Nodepool(self.sched) 137 nodepool = zuul.nodepool.Nodepool(self.sched)
138 138
139 zookeeper = zuul.zk.ZooKeeper() 139 zookeeper = zuul.zk.ZooKeeper()
140 zookeeper_hosts = get_default(self.config, 'zookeeper', 140 zookeeper_hosts = get_default(self.config, 'zookeeper', 'hosts', None)
141 'hosts', '127.0.0.1:2181') 141 if not zookeeper_hosts:
142 raise Exception("The zookeeper hosts config value is required")
142 zookeeper_timeout = float(get_default(self.config, 'zookeeper', 143 zookeeper_timeout = float(get_default(self.config, 'zookeeper',
143 'session_timeout', 10.0)) 144 'session_timeout', 10.0))
144 145
diff --git a/zuul/cmd/web.py b/zuul/cmd/web.py
index ed6b12b..b974a75 100755
--- a/zuul/cmd/web.py
+++ b/zuul/cmd/web.py
@@ -65,7 +65,9 @@ class WebServer(zuul.cmd.ZuulDaemonApp):
65 sys.exit(1) 65 sys.exit(1)
66 66
67 params["zk_hosts"] = get_default( 67 params["zk_hosts"] = get_default(
68 self.config, 'zookeeper', 'hosts', '127.0.0.1:2181') 68 self.config, 'zookeeper', 'hosts', None)
69 if not params["zk_hosts"]:
70 raise Exception("The zookeeper hosts config value is required")
69 71
70 try: 72 try:
71 self.web = zuul.web.ZuulWeb(**params) 73 self.web = zuul.web.ZuulWeb(**params)