summaryrefslogtreecommitdiffstats
path: root/ctdb/include/ctdb_private.h
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-01-22 13:30:47 +1100
committerAmitay Isaacs <amitay@samba.org>2014-03-23 04:20:15 +0100
commit9b907536fb657fa15c02858caf0ffff633ecd478 (patch)
tree048e4c0ce16336a97083a98f717dfb5a24c4ee6f /ctdb/include/ctdb_private.h
parentbafb9151ccb5722df36f9ba168716f4f4fa01cdc (diff)
downloadsamba-9b907536fb657fa15c02858caf0ffff633ecd478.tar.gz
samba-9b907536fb657fa15c02858caf0ffff633ecd478.tar.xz
samba-9b907536fb657fa15c02858caf0ffff633ecd478.zip
ctdb/daemon: Make delete IP wait until the IP is released
reloadips really expects deleted IPs to be released before completing. Otherwise the recovery daemon starts failing the local IP check. The races that follow can cause a node to be banned. To make the error handling simple, do the actual deletion in release_ip_callback(). Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/include/ctdb_private.h')
-rw-r--r--ctdb/include/ctdb_private.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index b95b2c7b84..8ed867d510 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -212,6 +212,11 @@ struct ctdb_vnn {
/* 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;
};
/*
@@ -1264,7 +1269,9 @@ int32_t ctdb_control_list_tunables(struct ctdb_context *ctdb, TDB_DATA *outdata)
int32_t ctdb_control_try_delete_records(struct ctdb_context *ctdb, TDB_DATA indata, TDB_DATA *outdata);
int32_t ctdb_control_receive_records(struct ctdb_context *ctdb, TDB_DATA indata, TDB_DATA *outdata);
int32_t ctdb_control_add_public_address(struct ctdb_context *ctdb, TDB_DATA indata);
-int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb, TDB_DATA indata);
+int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb,
+ struct ctdb_req_control *c,
+ TDB_DATA recdata, bool *async_reply);
void ctdb_tunables_set_defaults(struct ctdb_context *ctdb);