ctdb-tools: Drop "ctdb rebalancenode"
authorMartin Schwenke <martin@meltin.net>
Tue, 8 Mar 2016 05:29:56 +0000 (16:29 +1100)
committerAmitay Isaacs <amitay@samba.org>
Thu, 10 Mar 2016 02:34:19 +0000 (03:34 +0100)
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/doc/ctdb.1.xml
ctdb/tools/ctdb.c

index 01a7af84c34c81f1c83c45684662582d952119de..42012b4ce243d1ac83946aff1dd0a76c5b22191b 100644 (file)
@@ -1705,19 +1705,6 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/li
       </para>
     </refsect2>
 
-    <refsect2>
-      <title>
-       rebalancenode
-       <optional><parameter>PNN-LIST</parameter></optional>
-      </title>
-      <para>
-       This command marks the given nodes as rebalance targets in the
-       LCP2 IP allocation algorithm.  The
-       <command>reloadips</command> command will do this as necessary
-       so this command should not be needed.
-      </para>
-    </refsect2>
-
     <refsect2>
       <title>check_srvids <parameter>SRVID</parameter> ...</title>
       <para>
index 7d63a34264408b0571aeab57a9b29c01dc7cc78e..711aad41da30babc3330d9001f22a394e858c3b0 100644 (file)
@@ -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", "<dbname|dbid> <key>" },
        { "writekey",        control_writekey,          true,   false,  "write to a database key", "<dbname|dbid> <key> <value>" },
        { "checktcpport",    control_chktcpport,        false,  true,  "check if a service is bound to a specific tcp port or not", "<port>" },
-       { "rebalancenode",     control_rebalancenode,   false,  false, "mark nodes as forced IP rebalancing targets", "[<pnn-list>]"},
        { "getdbseqnum",     control_getdbseqnum,       false,  false, "get the sequence number off a database", "<dbname|dbid>" },
        { "nodestatus",      control_nodestatus,        true,   false,  "show and return node status", "[<pnn-list>]" },
        { "dbstatistics",    control_dbstatistics,      false,  false, "show db statistics", "<dbname|dbid>" },