cluster: RHEL6 - qdiskd: warn if no heuristics defied for >2 node clusters
Christine Caulfield
chrissie at fedoraproject.org
Mon Mar 2 16:41:45 UTC 2015
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=219771dcaff9ca66b313358019f7d11d4991d4b6
Commit: 219771dcaff9ca66b313358019f7d11d4991d4b6
Parent: fc4607ce77bf247440cb152c445f84834ace00a4
Author: Christine Caulfield <ccaulfie at redhat.com>
AuthorDate: Mon Mar 2 16:25:34 2015 +0000
Committer: Christine Caulfield <ccaulfie at redhat.com>
CommitterDate: Mon Mar 2 16:25:34 2015 +0000
qdiskd: warn if no heuristics defied for >2 node clusters
Cluster of 3 or more cluster nodes using qdisk are required to have at
least 1 heuristic.
If there is no heuristic configured, then it is possible that split
brain could occur.
Signed-off-by: Christine Caulfield <ccaulfie at redhat.com>
---
cman/qdisk/main.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index e84e788..413c093 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1959,6 +1959,15 @@ get_config_data(qd_ctx *ctx, struct h_data *h, int maxh, int *cfh)
"simple two-node cluster\n");
}
}
+ if (!(*cfh) && ctx->qc_auto_votes > 1) {
+ /*
+ * Heuristics must be defined for >2 node clusters
+ */
+ logt_print(LOG_CRIT, "No heuristics have been defined for this cluster\n");
+ logt_print(LOG_CRIT, "Clusters of more than 2 nodes using qdisk must have heuristics\n");
+ ret = -1;
+ goto out;
+ }
ret = 0;
More information about the cluster-commits
mailing list