[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Wed Aug 17 07:23:03 UTC 2016
The branch, master has been updated
via 47e6c37 ctdb-tools: Drop "ctdb rebalancenode"
via f376f34 ctdb-tools: Drop "ctdb rebalanceip"
via f635bd8 ctdb-tools: Addition of IPs is deferred until the next takeover run
from 639063d s3: vfs: shadow_copy2. Remove any trailing slash when stripping @GMT-YYYY... from the end of a path.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 47e6c37dca674f54992ffffb1c9895230c4c9e90
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Aug 15 15:58:58 2016 +1000
ctdb-tools: Drop "ctdb rebalancenode"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12151
This was already dropped in commit d67868469521341aa92c589a0bb6df90b150d555.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Wed Aug 17 09:22:13 CEST 2016 on sn-devel-144
commit f376f346f25f12b63a11e10d097282c364c1a514
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Aug 15 15:58:19 2016 +1000
ctdb-tools: Drop "ctdb rebalanceip"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12151
This was already dropped in commit aaa57fbcb392061f8fbb5a12fd0e6a7be934ab66.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit f635bd8997e2df1ed61429520e19fedb13cad97e
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Aug 15 15:54:51 2016 +1000
ctdb-tools: Addition of IPs is deferred until the next takeover run
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12152
This makes the behaviour of "ctdb addip" similar to "ctdb delip".
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
-----------------------------------------------------------------------
Summary of changes:
ctdb/doc/ctdb.1.xml | 13 +++--
ctdb/tests/simple/16_ctdb_config_add_ip.sh | 1 +
ctdb/tests/simple/60_recoverd_missing_ip.sh | 1 +
ctdb/tools/ctdb.c | 75 +----------------------------
4 files changed, 11 insertions(+), 79 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index 9324813..d295213 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -1031,13 +1031,16 @@ DB Statistics: locking.tdb
<refsect2>
<title>addip <parameter>IPADDR</parameter>/<parameter>mask</parameter> <parameter>IFACE</parameter></title>
<para>
- This command is used to add a new public ip to a node during runtime.
- This allows public addresses to be added to a cluster without having
- to restart the ctdb daemons.
+ This command is used to add a new public ip to a node
+ during runtime. It should be followed by a <command>ctdb
+ ipreallocate</command>. This allows public addresses to be
+ added to a cluster without having to restart the ctdb daemons.
</para>
<para>
- Note that this only updates the runtime instance of ctdb. Any changes will be lost next time ctdb is restarted and the public addresses file is re-read.
- If you want this change to be permanent you must also update the public addresses file manually.
+ Note that this only updates the runtime instance of ctdb. Any
+ changes will be lost next time ctdb is restarted and the public
+ addresses file is re-read. If you want this change to be
+ permanent you must also update the public addresses file manually.
</para>
</refsect2>
diff --git a/ctdb/tests/simple/16_ctdb_config_add_ip.sh b/ctdb/tests/simple/16_ctdb_config_add_ip.sh
index d33ec04..0bc668a 100755
--- a/ctdb/tests/simple/16_ctdb_config_add_ip.sh
+++ b/ctdb/tests/simple/16_ctdb_config_add_ip.sh
@@ -34,4 +34,5 @@ try_command_on_node -v all $CTDB ip
echo "Adding IP ${test_ip}/${mask} on ${iface}, node ${test_node}"
try_command_on_node $test_node $CTDB addip ${test_ip}/${mask} $iface
+try_command_on_node $test_node $CTDB ipreallocate
wait_until_ips_are_on_node $test_node $test_ip
diff --git a/ctdb/tests/simple/60_recoverd_missing_ip.sh b/ctdb/tests/simple/60_recoverd_missing_ip.sh
index cf68b19..c6b4de0 100755
--- a/ctdb/tests/simple/60_recoverd_missing_ip.sh
+++ b/ctdb/tests/simple/60_recoverd_missing_ip.sh
@@ -63,6 +63,7 @@ try_command_on_node $test_node $CTDB setifacelink $iface down
echo "Adding IP $test_ip to node $test_node"
try_command_on_node $test_node $CTDB addip $test_ip/$mask $iface
+try_command_on_node $test_node $CTDB ipreallocate
echo "Wait long enough for IP verification to have taken place"
sleep_for 15
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 2cb699a..a2aacff 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -3830,59 +3830,6 @@ static int control_moveip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
return 0;
}
-static int control_rebalanceip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
- int argc, const char **argv)
-{
- ctdb_sock_addr addr;
- struct ctdb_node_map *nodemap;
- struct ctdb_public_ip pubip;
- struct ctdb_req_control request;
- uint32_t *pnn_list;
- int ret, count;
-
- if (argc != 1) {
- usage("rebalanceip");
- }
-
- if (parse_ip(argv[0], NULL, 0, &addr)) {
- fprintf(stderr, "Invalid IP address %s\n", argv[0]);
- return 1;
- }
-
- ret = ctdb_message_disable_ip_check(mem_ctx, ctdb->ev, ctdb->client,
- CTDB_BROADCAST_CONNECTED,
- 2*options.timelimit);
- if (ret != 0) {
- fprintf(stderr, "Failed to disable IP check\n");
- return 1;
- }
-
- nodemap = get_nodemap(ctdb, false);
- if (nodemap == NULL) {
- return 1;
- }
-
- count = list_of_active_nodes(nodemap, -1, mem_ctx, &pnn_list);
- if (count <= 0) {
- fprintf(stderr, "Memory allocation error\n");
- return 1;
- }
-
- pubip.pnn = CTDB_UNKNOWN_PNN;
- pubip.addr = addr;
-
- ctdb_req_control_release_ip(&request, &pubip);
- ret = ctdb_client_control_multi(mem_ctx, ctdb->ev, ctdb->client,
- pnn_list, count, TIMEOUT(),
- &request, NULL, NULL);
- if (ret != 0) {
- fprintf(stderr, "Failed to release IP from nodes\n");
- return 1;
- }
-
- return ipreallocate(mem_ctx, ctdb);
-}
-
static int rebalancenode(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
uint32_t pnn)
{
@@ -3960,7 +3907,7 @@ static int control_addip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
return ret;
}
- return ipreallocate(mem_ctx, ctdb);
+ return 0;
}
static int control_delip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
@@ -5786,22 +5733,6 @@ static int control_checktcpport(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
return 0;
}
-static int control_rebalancenode(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
- int argc, const char **argv)
-{
- if (argc != 0) {
- usage("rebalancenode");
- }
-
- if (! rebalancenode(mem_ctx, ctdb, ctdb->cmd_pnn)) {
- fprintf(stderr, "Failed to rebalance IPs on node %u\n",
- ctdb->cmd_pnn);
- return 1;
- }
-
- return 0;
-}
-
static int control_getdbseqnum(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
int argc, const char **argv)
{
@@ -6287,8 +6218,6 @@ static const struct ctdb_cmd {
"reload the nodes file all nodes", NULL },
{ "moveip", control_moveip, false, false,
"move an ip address to another node", "<ip> <node>" },
- { "rebalanceip", control_rebalanceip, false, false,
- "move an ip address optimally to another node", "<ip>" },
{ "addip", control_addip, false, true,
"add an ip address to a node", "<ip/mask> <iface>" },
{ "delip", control_delip, false, true,
@@ -6346,8 +6275,6 @@ static const struct ctdb_cmd {
"delete a database key", "<dbname|dbid> <key>" },
{ "checktcpport", control_checktcpport, true, false,
"check if a service is bound to a specific tcp port or not", "<port>" },
- { "rebalancenode", control_rebalancenode, false, true,
- "mark nodes as forced IP rebalancing targets", NULL },
{ "getdbseqnum", control_getdbseqnum, false, false,
"get database sequence number", "<dbname|dbid>" },
{ "nodestatus", control_nodestatus, false, true,
--
Samba Shared Repository
More information about the samba-cvs
mailing list