We have 3 data nodes where 1 is in datacenter A and 2 are in datacenter B. We tried testing the failover resiliency of our cluster which resulted in kibana completely unable to do anything and a red cluster. I noticed that the system indices only have 1 primary and 1 replica shard which could in theory mean that both the shards could be allocated to Datacenter B.
Is there a way to update the amount of primary shards to maybe 2 for all system indices?
So we have three data nodes where two are "hot" nodes which stores data that is 1 week old and another "archive" node which gets the indexes which are older than 1 week.
Node 1 is in Datacenter A while Node 2 and Node 3 are in datacenter B.
By setting Node 1 to use:
And my cluster health turned to RED. So i used the Explain API call and this is what i got:
"can_allocate": "no",
"allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",
"node_allocation_decisions": [
{
"node_id": "045e5WjzQCCjHqj8g_VA2Q",
"node_name": "sealikreela04-archive",
"transport_address": "10.229.1.14:9300",
"node_attributes": {
"ml.machine_memory": "101352407040",
"ml.max_open_jobs": "20",
"xpack.installed": "true",
"box_type": "archive",
"ml.enabled": "true"
},
"node_decision": "no",
"deciders": [
{
"decider": "awareness",
"decision": "NO",
"explanation": "node does not contain the awareness attribute [JVB]; required attributes cluster setting [cluster.routing.allocation.awareness.attributes=JVB]"
Where did it go wrong? I have a total of 5 nodes where 3 are data nodes and 1 is only acting as a master node and the last one which is hosting kibana.
Do i need to tag all the nodes, even if they're not data nodes?
So i changed all of the 5 nodes to use allocation awareness attribute depending on which datacentre they're located in but the cluster health is now yellow with the following explained by the explain API:
"current_state": "unassigned",
"unassigned_info": {
"reason": "NODE_LEFT",
"at": "2018-07-04T11:47:09.221Z",
"details": "node_left[8MvsALY9RpSEPqJVXz3qxQ]",
"last_allocation_status": "no_attempt"
},
"can_allocate": "no",
"allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",
"node_allocation_decisions": [
{
"node_id": "045e5WjzQCCjHqj8g_VA2Q",
"node_name": "sealikreela04-archive",
"transport_address": "10.229.1.14:9300",
"node_attributes": {
"ml.machine_memory": "101352407040",
"ml.max_open_jobs": "20",
"xpack.installed": "true",
"box_type": "archive",
"ml.enabled": "true"
},
"node_decision": "no",
"deciders": [
{
"decider": "filter",
"decision": "NO",
"explanation": """node does not match index setting [index.routing.allocation.require] filters [box_type:"hot"]"""
},
{
"decider": "awareness",
"decision": "NO",
"explanation": "node does not contain the awareness attribute [KRE]; required attributes cluster setting [cluster.routing.allocation.awareness.attributes=KRE]"
}
However, the nodes do have the attribute configured in their elasticsearch.yml
EDIT: It looks like the cluster doesn't want to allocate to nodes because it doesn't think that the node is tagged with Datacentre A or Datacentre B. If i run the following command "GET /_cluster/settings" i get this:
is for the cluster, it belongs in the cluster settings. But in order to use that you have to specify that the nodes have the attribytes rack_id and zone or both.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.