couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [couchdb] branch master updated: add node count handling to ./dev/run
Date Sat, 03 Jun 2017 09:39:52 GMT
This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

The following commit(s) were added to refs/heads/master by this push:
       new  e9cc63f   add node count handling to ./dev/run
e9cc63f is described below

commit e9cc63fc9c524c6f1f0b736a45cb8b060f59929d
Author: Robert Kowalski <robertkowalski@apache.org>
AuthorDate: Fri Jul 24 16:21:36 2015 +0200

    add node count handling to ./dev/run
---
 dev/run | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/dev/run b/dev/run
index 781c715..8af3ac4 100755
--- a/dev/run
+++ b/dev/run
@@ -407,22 +407,23 @@ def boot_node(ctx, node):
 @log('Running cluster setup')
 def cluster_setup(ctx):
     lead_port, _ = get_ports(1)
-    if enable_cluster(lead_port, *ctx['admin']):
+    if enable_cluster(ctx['N'], lead_port, *ctx['admin']):
         for num in range(1, ctx['N']):
             node_port, _ = get_ports(num + 1)
-            enable_cluster(node_port, *ctx['admin'])
+            enable_cluster(ctx['N'], node_port, *ctx['admin'])
             add_node(lead_port, node_port, *ctx['admin'])
         finish_cluster(lead_port, *ctx['admin'])
     return lead_port
 
 
-def enable_cluster(port, user, pswd):
+def enable_cluster(node_count, port, user, pswd):
     conn = httpclient.HTTPConnection('127.0.0.1', port)
     conn.request('POST', '/_cluster_setup',
                  json.dumps({'action': 'enable_cluster',
                              'bind_address': '0.0.0.0',
                              'username': user,
-                             'password': pswd}),
+                             'password': pswd,
+                             'node_count': node_count}),
                  {'Authorization': basic_auth_header(user, pswd),
                   'Content-Type': 'application/json'})
     resp = conn.getresponse()

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message