ACK Reviewed-By: Christine Caulfield <ccaulfie@xxxxxxxxxx> On 02/03/12 11:02, Fabio M. Di Nitto wrote:
From: "Fabio M. Di Nitto"<fdinitto@xxxxxxxxxx> pointed out that leave_remove can be easily confused with the old cman leave_remove behavior. The two are substantially different and we need to avoid confusion both for users and our support team. Signed-off-by: Fabio M. Di Nitto<fdinitto@xxxxxxxxxx> --- exec/coroparse.c | 2 +- exec/votequorum.c | 24 ++++++++++++------------ man/votequorum.5 | 10 +++++----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/exec/coroparse.c b/exec/coroparse.c index 1d97323..c69a462 100644 --- a/exec/coroparse.c +++ b/exec/coroparse.c @@ -399,7 +399,7 @@ static int main_config_parser_cb(const char *path, } if ((strcmp(path, "quorum.two_node") == 0) || - (strcmp(path, "quorum.leave_remove") == 0) || + (strcmp(path, "quorum.allow_downscale") == 0) || (strcmp(path, "quorum.wait_for_all") == 0) || (strcmp(path, "quorum.auto_tie_breaker") == 0) || (strcmp(path, "quorum.last_man_standing") == 0)) { diff --git a/exec/votequorum.c b/exec/votequorum.c index 5a9b821..81d92a1 100644 --- a/exec/votequorum.c +++ b/exec/votequorum.c @@ -83,7 +83,7 @@ static int lowest_node_id = -1; static uint8_t last_man_standing = 0; static uint32_t last_man_standing_window = DEFAULT_LMS_WIN; -static uint8_t leave_remove = 0; +static uint8_t allow_downscale = 0; static uint32_t ev_barrier = 0; /* @@ -574,7 +574,7 @@ static int calculate_quorum(int allow_decrease, unsigned int max_expected, unsig ENTER(); - if ((leave_remove)&& (allow_decrease)&& (max_expected)) { + if ((allow_downscale)&& (allow_decrease)&& (max_expected)) { max_expected = max(ev_barrier, max_expected); } @@ -923,7 +923,7 @@ static char *votequorum_readconfig(int runtime) wait_for_all = 1; } - icmap_get_uint8("quorum.leave_remove",&leave_remove); + icmap_get_uint8("quorum.allow_downscale",&allow_downscale); icmap_get_uint8("quorum.wait_for_all",&wait_for_all); icmap_get_uint8("quorum.auto_tie_breaker",&auto_tie_breaker); icmap_get_uint8("quorum.last_man_standing",&last_man_standing); @@ -970,12 +970,12 @@ static char *votequorum_readconfig(int runtime) } } - if ((have_qdevice)&& (leave_remove)) { + if ((have_qdevice)&& (allow_downscale)) { if (!runtime) { - error = (char *)"configuration error: quorum.device is not compatible with leave_remove"; + error = (char *)"configuration error: quorum.device is not compatible with allow_downscale"; goto out; } else { - log_printf(LOGSYS_LEVEL_CRIT, "configuration error: quorum.device is not compatible with leave_remove"); + log_printf(LOGSYS_LEVEL_CRIT, "configuration error: quorum.device is not compatible with allow_downscale"); log_printf(LOGSYS_LEVEL_CRIT, "disabling quorum device operations"); update_qdevice_can_operate(0); } @@ -1663,7 +1663,7 @@ static int votequorum_exec_exit_fn (void) * tell the other nodes we are leaving */ - if (leave_remove) { + if (allow_downscale) { us->flags |= NODE_FLAGS_LEAVING; ret = votequorum_exec_send_nodeinfo(us->node_id); } @@ -1992,7 +1992,7 @@ static void message_handler_req_lib_votequorum_getinfo (void *conn, const void * if (auto_tie_breaker) { res_lib_votequorum_getinfo.flags |= VOTEQUORUM_INFO_AUTO_TIE_BREAKER; } - if (leave_remove) { + if (allow_downscale) { res_lib_votequorum_getinfo.flags |= VOTEQUORUM_INFO_LEAVE_REMOVE; } if (node->flags& NODE_FLAGS_QDEVICE) { @@ -2018,18 +2018,18 @@ static void message_handler_req_lib_votequorum_setexpected (void *conn, const vo cs_error_t error = CS_OK; unsigned int newquorum; unsigned int total_votes; - uint8_t leave_remove_status = 0; + uint8_t allow_downscale_status = 0; ENTER(); - leave_remove_status = leave_remove; - leave_remove = 0; + allow_downscale_status = allow_downscale; + allow_downscale = 0; /* * Validate new expected votes */ newquorum = calculate_quorum(1, req_lib_votequorum_setexpected->expected_votes,&total_votes); - leave_remove = leave_remove_status; + allow_downscale = allow_downscale_status; if (newquorum< total_votes / 2 || newquorum> total_votes) { error = CS_ERR_INVALID_PARAM; diff --git a/man/votequorum.5 b/man/votequorum.5 index ab10662..b93945b 100644 --- a/man/votequorum.5 +++ b/man/votequorum.5 @@ -271,13 +271,13 @@ quorum { .fi .PP -.B leave_remove: 1 +.B allow_downscale: 1 .PP -Enables leave remove (LR) feature (default: 0). +Enables allow downscale (AD) feature (default: 0). .PP The general behaviour of votequorum is to never decrease expected votes or quorum. .PP -When LR is enabled, both expected votes and quorum are recalculated when +When AD is enabled, both expected votes and quorum are recalculated when a node leaves the cluster in a clean state (normal corosync shutdown process) down to configured expected_votes. .PP @@ -312,13 +312,13 @@ Example configuration: quorum { provider: corosync_votequorum expected_votes: 3 - leave_remove: 1 + allow_downscale: 1 } .fi .PP .SH VARIOUS NOTES .PP -* WFA / LMS / ATB / LR can be used combined together. +* WFA / LMS / ATB / AD can be used combined together. .PP * In order to change the default votes for a node there are two options: .nf
_______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss