This document talks about separating 2 clusters and making sure no two clusters can mix unintentionally.
Lets say we do the steps, and after performing the steps there are 2 clusters, with names cluster1 and cluster2.
cluster1 → node1,node2,node3
cluster2 → node 5,node6,node7
After doing this, lets say i bring up node10 without any cluster name in the config but it has ip of node1 in its
mesh-seed-address-port. will this node be able to join the cluster? Or I need to make sure the new node10 has clustername set to “cluster1”?
A node with a non-matching cluster name cannot join a cluster. So in your scenario, you must assign the same cluster name to the new node that you want the node to be part of.
Then i have another questions. Initially when there was no cluster name in any node (node1,2,3). And I assigned cluster name to node1, how would node2 and node 3 accept node1? as their cluster name is diff than node1. how is this diff from node10 trying to join the cluster.
It has to do with how nodes determine cluster membership using heartbeat messages they exchange with all other nodes. A heartbeat from a node with a different cluster name is not accepted, and if certain number of valid heartbeats are missed from a node, it is removed from the cluster. Typically a node will be removed from the cluster in less than a couple of seconds without valid heartbeats.
When you change the cluster name in all nodes (nodes 1, 2, and 3 in your example), the operation takes effect across all nodes within a fraction of second. Therefore, all nodes continue to exchange valid heartbeats (with the new cluster name)., and remain part of the same cluster
However a new node (node 10 in your example) cannot join a cluster unless it can send the valid cluster name in its heartbeat message to the other nodes.
Hope this answers your questions.
thanks for the explanation,
This means that we have to change cluster name on all the nodes, almost simultaneously right? otherwise some nodes will be thrown out of the cluster.
If this is true, it is an important detail, can this be captured in the original doc?
Yes, that’s correct, the original doc needs to be updated.
Since you want the cluster operation unaffected, all nodes should be updated almost simultaneously. You can do so with
asadm that issues the command to all nodes. This should work unless something gets in the way of some nodes from getting the info command. So just to be extra safe, you could also either disable heartbeat or increase the heartbeat interval before issuing the cluster name change, and then revert to the prior heartbeat setting afterwards.