Gitweb:
http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=760542a89d8...
Commit: 760542a89d84cb0fb5683f60afd66c94eb696e00
Parent: fde6e0e3a1fc1dac3b95d7cd96315bb2231ccfd5
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Mar 24 15:26:23 2014 +0000
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Mon Mar 24 15:26:23 2014 +0000
qdisk: Make qdiskd warn if not all nodes are running qdiskd
Resolves: rhbz#994187
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
cman/qdisk/main.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 1873a05..6ee50fe 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -579,6 +579,7 @@ check_cman(qd_ctx *ctx, memb_mask_t mask, memb_mask_t master_mask)
{
cman_node_t nodes[MAX_NODES_DISK];
int retnodes, x;
+ static unsigned int check_cycle = 0;
if (cman_get_nodes(ctx->qc_ch_admin, MAX_NODES_DISK,
&retnodes, nodes) <0 )
@@ -586,6 +587,18 @@ check_cman(qd_ctx *ctx, memb_mask_t mask, memb_mask_t master_mask)
memset(master_mask, 0, sizeof(master_mask));
for (x = 0; x < retnodes; x++) {
+ /* See if the other node is running cman and not qdiskd.
+ * Just do this every 4 times (seconds) so we don't spam syslog
+ * too much. cman_is_listening() can return EBUSY which means
+ * "I don't know". We don't worry about this, and just report
+ * at the next check by which time it will.
+ */
+ check_cycle = (check_cycle + 1) % 4;
+ if ((check_cycle == 1) &&
+ (cman_is_listening(ctx->qc_ch_admin, nodes[x].cn_nodeid,
+ CLUSTER_PORT_QDISKD) == 0)) {
+ clulog(LOG_NOTICE, "node %s is up but not running qdiskd\n",
nodes[x].cn_name);
+ }
if (is_bit_set(mask, nodes[x].cn_nodeid-1, sizeof(mask)) &&
nodes[x].cn_member) {
set_bit(master_mask, nodes[x].cn_nodeid-1,