ctdb-daemon: Store node addresses as ctdb_sock_addr rather than strings
commita5be2c245d5634695bd23387913c7e2e2481879b
authorMartin Schwenke <martin@meltin.net>
Fri, 20 Feb 2015 00:47:23 +0000 (20 11:47 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 23 Mar 2015 11:23:12 +0000 (23 12:23 +0100)
tree3d891e1e738045b5fd52a1dbd3b8a93315f6228c
parent3cbeb17d0f9f1e4b6a3faa9aba2982793cf8494b
ctdb-daemon: Store node addresses as ctdb_sock_addr rather than strings

Every time a nodemap is contructed the node IP addresses all need to
be parsed.  This isn't very productive use of CPU.

Instead, parse each string once when the nodes file is loaded.  This
results in much simpler code.

This code also removes the use of ctdb_address.  Duplicating the port
is pointless without an abstraction layer around ctdb_address.  If
CTDB gets an incompatible transport in the future then add an
abstraction layer.

Note that the infiniband code is not updated.  Compilation of the
infiniband code is already broken.  Fixing it will be a separate,
properly tested effort.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
ctdb/common/ctdb_util.c
ctdb/common/system_util.c
ctdb/include/ctdb_client.h
ctdb/include/ctdb_private.h
ctdb/server/ctdb_daemon.c
ctdb/server/ctdb_recover.c
ctdb/server/ctdb_server.c
ctdb/tcp/tcp_connect.c
ctdb/tcp/tcp_init.c
ctdb/tests/src/ctdb_test_stubs.c