File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ def finish_cluster(names):
98
98
print ("=== Adding nodes to CouchDB cluster via the “setup coordination node” ===" )
99
99
for name in names :
100
100
# Exclude "this" pod
101
- if (name .split ("." , 1 ) != os .getenv ("HOSTNAME" )):
101
+ if (name .split ("." ,1 )[ 0 ] ) != os .getenv ("HOSTNAME" )):
102
102
# action: enable_cluster
103
103
payload = {}
104
104
payload ['action' ] = 'enable_cluster'
@@ -194,6 +194,8 @@ def sleep_forever():
194
194
if __name__ == '__main__' :
195
195
peer_names = discover_peers (construct_service_record ())
196
196
print ("Got the following peers' fqdm from DNS lookup:" ,peer_names ,flush = True )
197
+ if (os .getenv ("COUCHDB_USER" ) and os .getenv ("COUCHDB_PASSWORD" )):
198
+ enable_cluster (len (peer_names ))
197
199
connect_the_dots (peer_names )
198
200
print ('Cluster membership populated!' )
199
201
if (os .getenv ("COUCHDB_USER" ) and os .getenv ("COUCHDB_PASSWORD" )):
You can’t perform that action at this time.
0 commit comments