mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
aaa57fbcb3
commit
d678684695
@ -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>
|
||||
|
@ -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>" },
|
||||
|
Loading…
x
Reference in New Issue
Block a user