<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>
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
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
return ret;
}
- return ipreallocate(mem_ctx, ctdb);
+ return 0;
}
static int control_delip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,