kocolosk opened a new pull request #1658: Enable cluster auto-assembly through 
a seedlist
URL: https://github.com/apache/couchdb/pull/1658
 
 
   ## Overview
   
   This introduces a new config setting which allows an administrator to 
configure an initial list of nodes that should be contacted when a node boots 
up:
   
   ```
   [cluster]
   seedlist = 
[email protected],[email protected],[email protected]
   ```
   
   If configured, CouchDB will add every node in the seedlist to the `_nodes` 
DB automatically, which will trigger a distributed Erlang connection and a 
replication of the internal system databases to the local node. This eliminates 
the need to explicitly add each node using the HTTP API.
   
   We also modify the `/_up` endpoint to reflect the progress of the initial 
seeding of the node. If a seedlist is configured the endpoint will return 404 
until the local node has updated its local replica of each of the system 
databases from one of the members of the seedlist. The body of the HTTP 
response now looks like
   
   ```
   {
     "status": "seeding"
     "seeds": {
       "[email protected]": {
         "timestamp": "2018-10-16T19:58:03+00:00",
         "last_replication_status": "ok",
         "pending_updates": {"_nodes": 0, "_dbs": 101, "_users": 42}
       },
       "[email protected]": { ...
   }
   ```
   
   Once the status flips to "ok" the endpoint will return 200 and it's safe to 
direct requests to the new node.
   
   ## Testing recommendations
   
   - Configure the seedlist for a new 3 node cluster with the names of the 3 
nodes and check `/_membership` to confirm that the nodes connect to each other 
automatically
   - On a cluster with lots of databases or users, add a node to the cluster 
and check that `/_up` returns 404 while the initial internal replication takes 
place.
   
   You'll notice that the PR currently has no tests. I wanted to put it up for 
review while I familiarize myself with the latest bits of the test suite and 
see what I can contribute.
   
   ## Checklist
   
   - [x] Code is written and works correctly;
   - [ ] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to