summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-12 01:16:11 +0000
committerGerrit Code Review <review@openstack.org>2019-03-12 01:16:11 +0000
commitd0569f0214c14261e02d148e8f8381eeb3fe9068 (patch)
tree7ee87af378eb84be4a14796bbca448c08356457b
parent2f53cc216ae445c455fc80fae0162294ae4abe5f (diff)
parenta6b48d640c40a1618368c6a892d5d3d03f1741fd (diff)
Merge "Remove default zookeeper hosts"
-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 75d59bc..6cbcc71 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)