tests: Try to handle IPv6 addresses for local daemons
authorMartin Schwenke <martin@meltin.net>
Wed, 26 Nov 2014 10:32:22 +0000 (21:32 +1100)
committerMartin Schwenke <martin@meltin.net>
Wed, 10 Dec 2014 04:06:08 +0000 (15:06 +1100)
commit79aadd267337589a614ed55a6bea95d2c99f7dbd
tree0e4f50ca52807b2f66404cc927642269a1c9e01c
parent35856b396472c0e7e509b5bdc0bc06ce26d0eb91
tests: Try to handle IPv6 addresses for local daemons

If CTDB_USE_IPV6 is set then use IPv6 addresses for nodes and public
IPs.  This can be useful for some simple tests.  However, the node
address actually needs to be on lo so that ctdbd can bind to the port
on that address, so they actually need to be added as root before
running tests, like this:

  for i in $(seq 1 10) ; do ip addr add "fc00:10::${i}/64" dev lo ; done

IPv4 127.0.0.0/8 addresses are somehow magic and only one needs to be
on lo so that many can be bound to.

Also change the IPv4 node addresses to be (slightly) more exotic.

For both IPv4 and IPv6, choose addresses that are compatible with
socket wrapper.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Amitay Isaacs <amitay@gmail.com> (socket wrapper fixes)
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net> (socket wrapper fixes)
(Imported from commit d9d07fff34143d251b4987cdb1cff1e8b3384e64)
tests/simple/scripts/local_daemons.bash