4560e27e9c
- Upgrade corosync-2.4.2 to corosync-2.4.3(fate#321385) doc: document watchdog_device parameter Main: Call mlockall after fork Totempg: remove duplicate memcpy in mcast_msg func Qdevice: fix spell errors in qdevice logconfig: Do not overwrite logger_subsys priority totemconfig: Prefer nodelist over bindnetaddr cpghum: Fix printf of size_t variable Qnetd lms: Use UTILS_PRI_RING_ID printf format str wd: Report error when close of wd fails votequorum: Don't update expected_votes display if value is too high votequorum: simplify reconfigure message handling quorumtool: Add option to show all node addresses main: Don't ask libqb to handle segv, it doesn't work man: Document -a option to corosync-quorumtool main: use syslog & printf directly for early log messages votequorum: make atb consistent on nodelist reload Fix typo: Destorying -> Destroying init: Add doc URIs to the systemd service files wd: fix typo corosync.conf.5: Fix watchdog documentation corosync.conf.5: add warning about slow watchdogs wd: remove extra capitalization typo corosync.conf.5: watchdog support is conditional notifyd: Add the community name to an SNMP trap Logsys: Change logsys syslog_priority priority totemrrp: Fix situation when all rings are faulty main: Display reason why cluster cannot be formed totem: Propagate totem initialization failure totemcrypto: Refactor symmetric key importing OBS-URL: https://build.opensuse.org/request/show/535834 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=113
81 lines
3.1 KiB
Diff
81 lines
3.1 KiB
Diff
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
|
|
|