From d67868469521341aa92c589a0bb6df90b150d555 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 8 Mar 2016 16:29:56 +1100 Subject: [PATCH] ctdb-tools: Drop "ctdb rebalancenode" This was a workaround for trying to ensure public IP addresses are properly rebalanced after running "ctdb addip" on multiple nodes. "ctdb reloadips" is a better solution. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/doc/ctdb.1.xml | 13 ------------- ctdb/tools/ctdb.c | 36 ------------------------------------ 2 files changed, 49 deletions(-) diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml index 01a7af84c34..42012b4ce24 100644 --- a/ctdb/doc/ctdb.1.xml +++ b/ctdb/doc/ctdb.1.xml @@ -1705,19 +1705,6 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/li - - - rebalancenode - <optional><parameter>PNN-LIST</parameter></optional> - - - This command marks the given nodes as rebalance targets in the - LCP2 IP allocation algorithm. The - reloadips command will do this as necessary - so this command should not be needed. - - - check_srvids <parameter>SRVID</parameter> ... diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 7d63a342644..711aad41da3 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -1813,41 +1813,6 @@ static int rebalance_node(struct ctdb_context *ctdb, uint32_t pnn) } -/* - rebalance a node by setting it to allow failback and triggering a - takeover run - */ -static int control_rebalancenode(struct ctdb_context *ctdb, int argc, const char **argv) -{ - TALLOC_CTX *tmp_ctx = talloc_new(ctdb); - uint32_t *nodes; - uint32_t pnn_mode; - int i, ret; - - assert_single_node_only(); - - if (argc > 1) { - usage(); - } - - /* Determine the nodes where IPs need to be reloaded */ - if (!parse_nodestring(ctdb, tmp_ctx, argc == 1 ? argv[0] : NULL, - options.pnn, true, &nodes, &pnn_mode)) { - ret = -1; - goto done; - } - - for (i = 0; i < talloc_array_length(nodes); i++) { - if (!rebalance_node(ctdb, nodes[i])) { - ret = -1; - } - } - -done: - talloc_free(tmp_ctx); - return ret; -} - static int getips_store_callback(void *param, void *data) { struct ctdb_public_ip *node_ip = (struct ctdb_public_ip *)data; @@ -6321,7 +6286,6 @@ static const struct { { "readkey", control_readkey, true, false, "read the content off a database key", " " }, { "writekey", control_writekey, true, false, "write to a database key", " " }, { "checktcpport", control_chktcpport, false, true, "check if a service is bound to a specific tcp port or not", "" }, - { "rebalancenode", control_rebalancenode, false, false, "mark nodes as forced IP rebalancing targets", "[]"}, { "getdbseqnum", control_getdbseqnum, false, false, "get the sequence number off a database", "" }, { "nodestatus", control_nodestatus, true, false, "show and return node status", "[]" }, { "dbstatistics", control_dbstatistics, false, false, "show db statistics", "" },