corosync/0004-main-Display-reason-why-cluster-cannot-be-formed.patch
Bin Liu d49338dc97 Accepting request 501563 from home:BinLiu:branches:network:ha-clustering:Factory
-  some Fixes from upstream(bsc#1043045)
Added: 
    0004-main-Display-reason-why-cluster-cannot-be-formed.patch
    0005-votequorum-Report-errors-from-votequorum_exec_send_r.patch
    0006-coroapi-Use-size_t-for-private_data_size.patch

OBS-URL: https://build.opensuse.org/request/show/501563
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=90
2017-06-07 06:33:45 +00:00

46 lines
1.7 KiB
Diff

From 9f5fde414d114e02e686f59f40e5080fedc70224 Mon Sep 17 00:00:00 2001
From: Bin Liu <bliu@suse.com>
Date: Wed, 7 Jun 2017 13:29:14 +0800
Subject: [PATCH] main: Display reason why cluster cannot be formed
---
exec/main.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/exec/main.c b/exec/main.c
index 7d2dcf7c..da9e1ecd 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -497,6 +497,7 @@ static void corosync_totem_stats_updater (void *data)
uint32_t total_token_holdtime;
int t, prev, i;
int32_t token_count;
+ const char *cstr;
char key_name[ICMAP_KEYNAME_MAXLEN];
stats = api->totem_get_stats();
@@ -535,11 +536,18 @@ static void corosync_totem_stats_updater (void *data)
if (stats->mrp->srp->continuous_gather > MAX_NO_CONT_GATHER ||
stats->mrp->srp->continuous_sendmsg_failures > MAX_NO_CONT_SENDMSG_FAILURES) {
+ cstr = "";
+ if (stats->mrp->srp->continuous_sendmsg_failures > MAX_NO_CONT_SENDMSG_FAILURES) {
+ cstr = "number of multicast sendmsg failures is above threshold";
+ }
+ if (stats->mrp->srp->continuous_gather > MAX_NO_CONT_GATHER) {
+ cstr = "totem is continuously in gather state";
+ }
log_printf (LOGSYS_LEVEL_WARNING,
"Totem is unable to form a cluster because of an "
- "operating system or network fault. The most common "
+ "operating system or network fault(reason: %s). The most common "
"cause of this message is that the local firewall is "
- "configured improperly.");
+ "configured improperly.", cstr);
icmap_set_uint8("runtime.totem.pg.mrp.srp.firewall_enabled_or_nic_failure", 1);
} else {
icmap_set_uint8("runtime.totem.pg.mrp.srp.firewall_enabled_or_nic_failure", 0);
--
2.12.0