You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/10/16 20:11:00 UTC

[GitHub] kocolosk opened a new pull request #1658: Enable cluster auto-assembly through a seedlist

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 = couchdb@node1.example.com,couchdb@node2.example.com,couchdb@node3.example.com
   ```
   
   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": {
       "couchdb@node1.example.com": {
         "timestamp": "2018-10-16T19:58:03+00:00",
         "last_replication_status": "ok",
         "pending_updates": {"_nodes": 0, "_dbs": 101, "_users": 42}
       },
       "couchdb@node2.example.com": { ...
   }
   ```
   
   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:
users@infra.apache.org


With regards,
Apache Git Services