Accepting request 501564 from network:ha-clustering:Factory

1

OBS-URL: https://build.opensuse.org/request/show/501564
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/corosync?expand=0&rev=38
This commit is contained in:
Dominique Leuenberger 2017-06-17 08:19:57 +00:00 committed by Git OBS Bridge
commit dde4d1a658
5 changed files with 281 additions and 30 deletions

View 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

View File

@ -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

View 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

View File

@ -1,27 +1,47 @@
-------------------------------------------------------------------
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)
add change log for upgrading corosync to v2.3.6 and make this change log contain all records in SLE12 SP3
make the format consistent
-------------------------------------------------------------------
Tue May 16 03:05:05 UTC 2017 - bliu@suse.com
- totemrrp: Fix situation when all rings are faulty(bsc#1039215)
Added: 0003-totemrrp-Fix-situation-when-all-rings-are-faulty.patch
Added:
0003-totemrrp-Fix-situation-when-all-rings-are-faulty.patch
-------------------------------------------------------------------
Tue May 9 04:17:35 UTC 2017 - bliu@suse.com
- calling mlockall before corosync_tty_detach is noop when corosync is executed as a daemon(bsc#1038147)
Added: 0002-Main-call-mlock-after-fork.patch
Added:
0002-Main-call-mlock-after-fork.patch
-------------------------------------------------------------------
Mon Apr 10 06:42:51 UTC 2017 - bliu@suse.com
- [upgrade] Changing the pre-upgrade role for node failed(bsc#1030437)
Added:0001-totemconfig.c-Fixed-Evicted-from-CPG-membership.patch
removed: 0001-totemip.c-Fixed-Evicted-from-CPG-membership.patch
Added:
0001-totemconfig.c-Fixed-Evicted-from-CPG-membership.patch
Removed:
0001-totemip.c-Fixed-Evicted-from-CPG-membership.patch
-------------------------------------------------------------------
Tue Mar 14 07:14:58 UTC 2017 - bliu@suse.com
- L3-Question: corosync logging priority takes no effect(bsc#1023959)
added:
Added:
0001-Logsys-Change-logsys-syslog_priority-priority.patch
0001-logconfig.c-make-logging.syslog_priority-and-logging.patch
@ -29,8 +49,10 @@ Tue Mar 14 07:14:58 UTC 2017 - bliu@suse.com
Tue Dec 6 08:19:09 UTC 2016 - bliu@suse.com
- Corosync 2.4.1 still produces libvotequorum.so.7.0.0, just like Corosync 2.3.6.(bsc#1013842)
added: disable-build-html-docs.patch
upgrade to corosync-2.4.2:
Added:
disable-build-html-docs.patch
upgrade to corosync-2.4.2:
Man: Fix corosync-qdevice-net-certutil link
man: mention qdevice incompatibilites in votequorum.5
Qnetd LMS: Fix two partition use case
@ -40,38 +62,91 @@ Tue Dec 6 08:19:09 UTC 2016 - bliu@suse.com
Mon Oct 17 08:28:33 UTC 2016 - bliu@suse.com
- upgrade to corosync-2.4.1(bsc#1004967)
added: corosync-start-stop-level.patch
deleted: corosync-cts-api-error.patch
modified: bnc#867767-add-version.patch, change version to 2.4.1
corosync-2.4.1:
Added:
corosync-start-stop-level.patch
Deleted:
Config-Flag-config-uidgid-entries.patch
cfg-Prevents-use-of-uninitialized-buffer.patch
cts-Make-it-run-with-pacemaker-1.13.patch
get_cluster_mcast_addr-error-is-not-fatal.patch
totemsrp-Addition-of-the-log.patch
modified: bnc#867767-add-version.patch, change version to 2.4.1
corosync-2.4.1:
Low: totemsrp: Addition of the log.
cts: Make it run with pacemaker-1.13+
Config: Flag config uidgid entries
Spec: Qdevice require same version of corosync
corosync-2.4.0:
corosync-2.4.0:
qdevice and qnet
config: get_cluster_mcast_addr error is not fatal
some typo fixes
-------------------------------------------------------------------
Thu Oct 15 05:19:36 UTC 2016 - bliu@suse.com
corosync-v2.3.6
CFG: Prevent CFG orignating messages during SYNC
wd: fix setting of watchdog timeouts
votequorum: Don't send multiple callbacks when nodes join
cfgtool: Display nodeid as unsigned int
quorum: Display node id as unsigned int.
Check for fdatasync
Fix detection of qb_log_thread_priority_set
totempg: Fix memory leak
cpg: Memory not unmapped in cpg_zcb_free
cpg: Handle ipc error in cpg_zcb_alloc/free
totemconfig: Explicitly pass IP version
parser: Make config file parser more hierarchy
logsys: fix TOTEM logging when corosync built out of tree
wd: make watchdog device configurable
schedwrk: Cleanup and make it work on PPC BE
Reapply config defaults corosync.conf reload
logconfig: Fix logging reload disabling logfiles
upgrade corosync-v2.3.5 to corosync-v2.3.6, and backport patches from v2.4.2(FATE#322113, bsc#1020550)
Added:
Config-Flag-config-uidgid-entries.patch
cfg-Prevents-use-of-uninitialized-buffer.patch
cts-Make-it-run-with-pacemaker-1.13.patch
get_cluster_mcast_addr-error-is-not-fatal.patch
totemsrp-Addition-of-the-log.patch
Removed:
corosync-cts-api-error.patch
v2.3.6
- logconfig: Fix logging reload disabling logfiles
- wd: Warn if values are out of range
- parser: WD Read type correctly from corosync.conf
- Add some more RO keys
- Reapply config defaults corosync.conf reload
- schedwrk: Cleanup and make it work on PPC BE
- cmapctl: Handle corosync errors in print_key func
- Adds doxygen stubs to include directory
- Add clang-format configuration file
- wd: make watchdog device configurable
- logging: Use our own version of basename
- logsys: fix TOTEM logging when corosync built out of tree
- parser: Make config file parser more hierarchy
- totemconfig: Explicitly pass IP version
- cpg: Handle ipc error in cpg_zcb_alloc/free
- cpg: Memory not unmapped in cpg_zcb_free
- totempg: Fix memory leak
- Fix spelling errors
- Add section in manual title for cpg_zcb_free 3
- Add section in manual title for cpg_zcb_alloc 3
- Update corosync.spec source link
- Update gitignore files
- Remove all links to old ML
- totemsrp: Fix clang warning (tautological compare)
- configure.ac: Make location of .pc overrideable
- Remove a few unused variables and functions
- configure.ac: We don't need no C++ compiler
- configure.ac: Remove deprecated AC_PROG_LIBTOOL
- configure.ac: make foreign apply to all Makefiles
- Remove unused, obsolete check
- Fix detection of qb_log_thread_priority_set
- cpghum: Fix type of recv_crc
- Check for fdatasync
- Fix detection of warning flags for clang
- quorum: Display node id as unsigned int.
- cts: InitClusterManager is now BootCluster
- totemudp: Move udp bind() so that multicast works with IPv6
- cfgtool: Display nodeid as unsigned int
- votequorum: Don't send multiple callbacks when nodes join
- man: Add synopsis for cpg_zcb_alloc and free
- man html index: Update index
- votequorum: Make sure cs_error_t is defined
- Doxygen fix for cmap_iter_next()
- configure: Correct help entry for logdir
- totmesrp: Fix typo in log message
- configure: typo in include
- man page: Correct option letter for DBus
- wd: fix setting of watchdog timeouts
- CFG: Prevent CFG orignating messages during SYNC
-------------------------------------------------------------------
Tue Sep 27 07:33:09 UTC 2016 - bliu@suse.com

View File

@ -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}