Browse Source

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
tags/3.7.0
James E. Blair 3 months ago
parent
commit
a6b48d640c

+ 0
- 4
doc/source/admin/components.rst View File

@@ -143,10 +143,6 @@ The following sections of ``zuul.conf`` are used by all Zuul components:
143 143
       If present, this will be prefixed to all of the keys before
144 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 146
 .. attr:: zookeeper
151 147
 
152 148
    Client connection information for ZooKeeper

+ 6
- 0
releasenotes/notes/zookeeper-hosts-4dd0d7c49f3df206.yaml View File

@@ -0,0 +1,6 @@
1
+---
2
+upgrade:
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).

+ 3
- 2
zuul/cmd/scheduler.py View File

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

+ 3
- 1
zuul/cmd/web.py View File

@@ -65,7 +65,9 @@ class WebServer(zuul.cmd.ZuulDaemonApp):
65 65
                 sys.exit(1)
66 66
 
67 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 72
         try:
71 73
             self.web = zuul.web.ZuulWeb(**params)

Loading…
Cancel
Save