summaryrefslogtreecommitdiff
path: root/ctdb/server
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-06-14 06:44:29 +1000
committerStefan Metzmacher <metze@samba.org>2016-07-28 05:00:15 +0200
commit10165c48f17ba608fb3e9c2e84e308b061e024c5 (patch)
tree72572c9b2979d702766493f1c4907d738903032f /ctdb/server
parentc40fc62642ff5ac49b75e9af49c299e33dbc9073 (diff)
downloadsamba-10165c48f17ba608fb3e9c2e84e308b061e024c5.tar.gz
ctdb-daemon: Move CTDB VNN structure to IP takeover code
It is only used in this code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/server')
-rw-r--r--ctdb/server/ctdb_takeover.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index e6d3b325f09..84dcd98ccbf 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -55,6 +55,39 @@ struct ctdb_interface {
uint32_t references;
};
+/* state associated with a public ip address */
+struct ctdb_vnn {
+ struct ctdb_vnn *prev, *next;
+
+ struct ctdb_interface *iface;
+ const char **ifaces;
+ ctdb_sock_addr public_address;
+ uint8_t public_netmask_bits;
+
+ /* the node number that is serving this public address, if any.
+ If no node serves this ip it is set to -1 */
+ int32_t pnn;
+
+ /* List of clients to tickle for this public address */
+ struct ctdb_tcp_array *tcp_array;
+
+ /* whether we need to update the other nodes with changes to our list
+ of connected clients */
+ bool tcp_update_needed;
+
+ /* a context to hang sending gratious arp events off */
+ TALLOC_CTX *takeover_ctx;
+
+ /* Set to true any time an update to this VNN is in flight.
+ This helps to avoid races. */
+ bool update_in_flight;
+
+ /* If CTDB_CONTROL_DEL_PUBLIC_IP is received for this IP
+ * address then this flag is set. It will be deleted in the
+ * release IP callback. */
+ bool delete_pending;
+};
+
static const char *ctdb_vnn_iface_string(const struct ctdb_vnn *vnn)
{
if (vnn->iface) {