1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2016-08-15 15:54:51 +10:00 committed by Martin Schwenke
parent 639063da8c
commit f635bd8997
4 changed files with 11 additions and 6 deletions

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -3960,7 +3960,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,