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/11/28 22:20:51 UTC

[GitHub] iilyak opened a new pull request #1774: Support for more than 3 nodes dev cluster

iilyak opened a new pull request #1774: Support for more than 3 nodes dev cluster
URL: https://github.com/apache/couchdb/pull/1774
 
 
   ## Overview
   
   Add support for dev cluster with more than 3 nodes. Even though we have `-n <N>` option for `dev/run` it has a couple of limitations.
   - The number of nodes cannot be more than 5. Otherwise we try to allocate tcp ports greater than  65535
   - The number of nodes is assumed to be 3 in couple of places
     - [in setup application](https://github.com/apache/couchdb/blob/master/src/setup/src/setup.erl#L289:L294)
     - [in haproxy config](https://github.com/apache/couchdb/blob/master/rel/haproxy.cfg)
   
   This PR removes the limitation and adds `--random-ports` which we are planing to use to run Elixir test suite. So we can instantiate a second instance of the cluster specifically for test suite.
    
   ## Testing recommendations
   
   ### Testing `--random-ports` option
   
   1. clean development environment `rm -rf dev/lib`
   2. run cluster as follows `dev/run --admin=adm:pass --random-ports` (**note the port number of the cluster**)
     - verify that logs printed on console use random ports for nodes 
   3. let it start and call `_membership` endpoint (use the port noted in step 2)
   4. (optional): remsh into cluster and run `mem3:nodes()`
   
   ### Testing more than 3 nodes
   
   1. clean development environment `rm -rf dev/lib`
   2. run cluster as follows `dev/run --admin=adm:pass -n 10` (**note the port number of the cluster**)
     - verify that logs printed on console use random ports for nodes starting from 4th node
   3. let it start and call `_membership` endpoint (use port noted in step 2)
     - verify that there are 10 nodes returned
   4. (optional): remsh into cluster and run `mem3:nodes()`
    
   ## Related Issues or Pull Requests
   
   ## 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