delete and readd of the same ip address to ctdb nodes file

Martin Schwenke martin at meltin.net
Mon Jul 18 21:16:27 UTC 2016


Hi Steve,

On Mon, 18 Jul 2016 16:06:00 -0500, Steve French <smfrench at gmail.com>
wrote:

> In https://ctdb.samba.org/manpages/ctdb.1.html it describes the
> process for removing (and also adding) nodes, but it is not clear what
> is optimal way to delete a node and then readd a node with the same ip
> address.   In three node cluster, thus with three line /etc/ctdb/nodes
> file, if you delete one you still have a three line /etc/ctdb/nodes
> file (but one entry is now commented out in each), but what happens if
> you readd a node with the same ip address as the one commented out?
> Is it possible to uncomment the line in /etc/ctdb/nodes and reload the
> nodes file?

Yes, that's exactly the right thing to do.

The comment syntax really only serves to maintain the correct
association between IP addresses and node numbers (or PNNs) (via 0-based
line number, to keep it interesting).  So the comment puts a gap in the
PNN sequence.

As I've commented before, a richer syntax with explicit IP address <->
PNN mapping would probably be an improvement...  but this never makes
it to the top of the dveelopment queue.

> I am thinking that eventually if you can't 'reuse' a commented out
> line in /etc/ctdb/nodes the file could get quite big eventually (if
> nodes are added/deleted frequently as some of our testers testcases
> were done to exercise the code).

Not sure if the tests are scripting the delete/add, but if scripting
delete and add of nodes, the scripts would have to be clever enough to
deal with the above case.

peace & happiness,
martin



More information about the samba-technical mailing list