add_node: Don't fail if node name != "couchdb" or "node1"
Adding nodes to a cluster fails if the node names (the `name` of
`name@hostname` in vm.args) is different from "couchdb".
The code currently infers this name from the port: "node1" if 15984,
"node2" if 25984, "node3" if 35984, "couchdb" otherwise. No other
possibility.
This is not suited for a production set-up, where multiple servers could
have different names.
This patch fixes this problem by adding an optional "name" option to the
"add_node" command:
POST /_cluster_setup
{
"action": "add_node",
"username": "root",
"password": "******",
"host": "production-server.com",
"port": 5984,
"name": "node5"
}
This fixes: COUCHDB-3119