Bug#23546, Cluster configured without any arbitration

parent e9fcb1e3
......@@ -3604,6 +3604,7 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>&sections,
Uint32 db_nodes= 0;
Uint32 replicas= 0;
Uint32 db_host_count= 0;
bool with_arbitration_rank= false;
ctx.m_userProperties.get(DB_TOKEN, &db_nodes);
ctx.m_userProperties.get("NoOfReplicas", &replicas);
if((db_nodes % replicas) != 0){
......@@ -3670,7 +3671,6 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>&sections,
node_group_warning.appfmt(" Node group %d", group);
c|= 1 << j;
p_db_hosts.put(str.c_str(),c);
node_group_warning.appfmt(",\n db node with id %d and id %d "
"on same host %s", other_i, i, host);
}
......@@ -3698,6 +3698,7 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>&sections,
Uint32 rank;
if(tmp->get("ArbitrationRank", &rank) && rank > 0)
{
with_arbitration_rank = true; //check whether MGM or API node configured with rank >0
if(host && host[0] != 0)
{
Uint32 ii;
......@@ -3716,6 +3717,13 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>&sections,
}
if (db_host_count > 1 && node_group_warning.length() > 0)
ndbout_c("Cluster configuration warning:\n%s",node_group_warning.c_str());
if (!with_arbitration_rank)
{
ndbout_c("Cluster configuration warning:"
"\n Neither %s nor %s nodes are configured with arbitrator,"
"\n may cause complete cluster shutdown in case of host failure.",
MGM_TOKEN, API_TOKEN);
}
if (db_host_count > 1 && arbitration_warning.length() > 0)
ndbout_c("Cluster configuration warning:%s%s",arbitration_warning.c_str(),
"\n Running arbitrator on the same host as a database node may"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment