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
This commit is contained in:
parent
52b1542cec
commit
d49338dc97
45
0004-main-Display-reason-why-cluster-cannot-be-formed.patch
Normal file
45
0004-main-Display-reason-why-cluster-cannot-be-formed.patch
Normal file
@ -0,0 +1,45 @@
|
||||
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
|
||||
|
@ -0,0 +1,80 @@
|
||||
From c1d0a5fe6380b007dd31f85a07b4aaca57eb14a2 Mon Sep 17 00:00:00 2001
|
||||
From: Bin Liu <bliu@suse.com>
|
||||
Date: Wed, 7 Jun 2017 13:46:25 +0800
|
||||
Subject: [PATCH] votequorum: Report errors from
|
||||
votequorum_exec_send_reconfigure
|
||||
|
||||
If votequorum_exec_send_reconfigure() returns an error (ie the
|
||||
packet could not be sent) then we should either return it to the
|
||||
sender (for a library call) or, for an internal call, log it.
|
||||
---
|
||||
exec/votequorum.c | 30 ++++++++++++++++++++----------
|
||||
1 file changed, 20 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/exec/votequorum.c b/exec/votequorum.c
|
||||
index d29a717f..e85c07d3 100644
|
||||
--- a/exec/votequorum.c
|
||||
+++ b/exec/votequorum.c
|
||||
@@ -1559,8 +1559,10 @@ static void votequorum_refresh_config(
|
||||
if (strcmp(key_name, "quorum.cancel_wait_for_all") == 0 &&
|
||||
cancel_wfa >= 1) {
|
||||
icmap_set_uint8("quorum.cancel_wait_for_all", 0);
|
||||
- votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_CANCEL_WFA,
|
||||
- us->node_id, 0);
|
||||
+ if (votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_CANCEL_WFA,
|
||||
+ us->node_id, 0)) {
|
||||
+ log_printf(LOGSYS_LEVEL_ERROR, "Failed to send Cancel WFA message to other nodes");
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1578,12 +1580,16 @@ static void votequorum_refresh_config(
|
||||
votequorum_exec_send_nodeinfo(us->node_id);
|
||||
votequorum_exec_send_nodeinfo(VOTEQUORUM_QDEVICE_NODEID);
|
||||
if (us->votes != old_votes) {
|
||||
- votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_NODE_VOTES,
|
||||
- us->node_id, us->votes);
|
||||
+ if(votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_NODE_VOTES,
|
||||
+ us->node_id, us->votes)) {
|
||||
+ log_printf(LOGSYS_LEVEL_ERROR, "Failed to send new votes message to other nodes");
|
||||
+ }
|
||||
}
|
||||
if (us->expected_votes != old_expected_votes) {
|
||||
- votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_EXPECTED_VOTES,
|
||||
- us->node_id, us->expected_votes);
|
||||
+ if(votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_EXPECTED_VOTES,
|
||||
+ us->node_id, us->expected_votes)) {
|
||||
+ log_printf(LOGSYS_LEVEL_ERROR, "Failed to send new votes message to other nodes");
|
||||
+ }
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
@@ -2610,8 +2616,10 @@ static void message_handler_req_lib_votequorum_setexpected (void *conn, const vo
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
- votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_EXPECTED_VOTES, us->node_id,
|
||||
- req_lib_votequorum_setexpected->expected_votes);
|
||||
+ if(votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_EXPECTED_VOTES, us->node_id,
|
||||
+ req_lib_votequorum_setexpected->expected_votes)) {
|
||||
+ error = CS_ERR_NO_RESOURCES;
|
||||
+ }
|
||||
|
||||
error_exit:
|
||||
res_lib_votequorum_status.header.size = sizeof(res_lib_votequorum_status);
|
||||
@@ -2657,8 +2665,10 @@ static void message_handler_req_lib_votequorum_setvotes (void *conn, const void
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
- votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_NODE_VOTES, nodeid,
|
||||
- req_lib_votequorum_setvotes->votes);
|
||||
+ if(votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_NODE_VOTES, nodeid,
|
||||
+ req_lib_votequorum_setvotes->votes)) {
|
||||
+ error = CS_ERR_NO_RESOURCES;
|
||||
+ }
|
||||
|
||||
error_exit:
|
||||
res_lib_votequorum_status.header.size = sizeof(res_lib_votequorum_status);
|
||||
--
|
||||
2.12.0
|
||||
|
45
0006-coroapi-Use-size_t-for-private_data_size.patch
Normal file
45
0006-coroapi-Use-size_t-for-private_data_size.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From afd97d788494007462b95a237161310af4c6e233 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jones <jonesmz@jonesmz.com>
|
||||
Date: Thu, 25 May 2017 13:29:19 -0500
|
||||
Subject: [PATCH 6/6] coroapi: Use size_t for private_data_size
|
||||
|
||||
Unsigned int and size_t represent two different concepts.
|
||||
|
||||
Same problem was present in ipc_glue.
|
||||
|
||||
Signed-off-by: Michael Jones <jonesmz@jonesmz.com>
|
||||
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
|
||||
---
|
||||
exec/ipc_glue.c | 2 +-
|
||||
include/corosync/coroapi.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/exec/ipc_glue.c b/exec/ipc_glue.c
|
||||
index d0a25d98..8b34d495 100644
|
||||
--- a/exec/ipc_glue.c
|
||||
+++ b/exec/ipc_glue.c
|
||||
@@ -272,7 +272,7 @@ static void cs_ipcs_connection_created(qb_ipcs_connection_t *c)
|
||||
struct cs_ipcs_conn_context *context;
|
||||
char proc_name[32];
|
||||
struct qb_ipcs_connection_stats stats;
|
||||
- int32_t size = sizeof(struct cs_ipcs_conn_context);
|
||||
+ size_t size = sizeof(struct cs_ipcs_conn_context);
|
||||
char key_name[ICMAP_KEYNAME_MAXLEN];
|
||||
int set_client_pid = 0;
|
||||
int set_proc_name = 0;
|
||||
diff --git a/include/corosync/coroapi.h b/include/corosync/coroapi.h
|
||||
index ff02a54f..3a36f255 100644
|
||||
--- a/include/corosync/coroapi.h
|
||||
+++ b/include/corosync/coroapi.h
|
||||
@@ -494,7 +494,7 @@ struct corosync_service_engine {
|
||||
unsigned short priority; /* Lower priority are loaded first, unloaded last.
|
||||
* 0 is a special case which always loaded _and_ unloaded last
|
||||
*/
|
||||
- unsigned int private_data_size;
|
||||
+ size_t private_data_size;
|
||||
enum cs_lib_flow_control flow_control;
|
||||
enum cs_lib_allow_inquorate allow_inquorate;
|
||||
char *(*exec_init_fn) (struct corosync_api_v1 *);
|
||||
--
|
||||
2.12.0
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 7 06:06:38 UTC 2017 - bliu@suse.com
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 6 16:57:05 UTC 2017 - bliu@suse.com
|
||||
[patch-lost-in-sle] Missing issues in openSUSE:Factory/corosync(bsc#1041587)
|
||||
|
@ -65,6 +65,9 @@ Patch10: 0001-logconfig.c-make-logging.syslog_priority-and-logging.patch
|
||||
Patch11: 0001-totemconfig.c-Fixed-Evicted-from-CPG-membership.patch
|
||||
Patch12: 0002-Main-call-mlock-after-fork.patch
|
||||
Patch13: 0003-totemrrp-Fix-situation-when-all-rings-are-faulty.patch
|
||||
Patch14: 0004-main-Display-reason-why-cluster-cannot-be-formed.patch
|
||||
Patch15: 0005-votequorum-Report-errors-from-votequorum_exec_send_r.patch
|
||||
Patch16: 0006-coroapi-Use-size_t-for-private_data_size.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# openais is indeed gone and should be uninstalled. Yes, we do not
|
||||
@ -137,6 +140,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
|
||||
%build
|
||||
%if %{with_runautogen}
|
||||
|
Loading…
Reference in New Issue
Block a user