summaryrefslogtreecommitdiffstats
path: root/ctdb/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-06-01 19:05:41 +1000
committerAndrew Tridgell <tridge@samba.org>2007-06-01 19:05:41 +1000
commit7db1d04d5cdc548b65b57bdfca03e80a2d5dc5c5 (patch)
treec7d8a148b449cfc5121f29a1fbe777f27564c300 /ctdb/include
parent869d70d9c9b05fc97102317c88bd02fed9aba421 (diff)
downloadsamba-7db1d04d5cdc548b65b57bdfca03e80a2d5dc5c5.tar.gz
samba-7db1d04d5cdc548b65b57bdfca03e80a2d5dc5c5.tar.xz
samba-7db1d04d5cdc548b65b57bdfca03e80a2d5dc5c5.zip
make the running of the takeover and release event scripts async, to prevent outages due to slow scripts
(This used to be ctdb commit 4189be97eee7ab2a50335c860f2fcd9566667d01)
Diffstat (limited to 'ctdb/include')
-rw-r--r--ctdb/include/ctdb_private.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index d3320ac163..f2087e8e90 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -925,10 +925,16 @@ int ctdb_ctrl_set_rsn_nonempty(struct ctdb_context *ctdb, struct timeval timeout
int ctdb_ctrl_delete_low_rsn(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, uint32_t db_id, uint64_t rsn);
void ctdb_set_realtime(void);
-int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb, TDB_DATA indata);
+int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
+ struct ctdb_req_control *c,
+ TDB_DATA indata,
+ bool *async_reply);
int ctdb_ctrl_takeover_ip(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, const char *ip);
-int32_t ctdb_control_release_ip(struct ctdb_context *ctdb, TDB_DATA indata);
+int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
+ struct ctdb_req_control *c,
+ TDB_DATA indata,
+ bool *async_reply);
int ctdb_ctrl_release_ip(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, const char *ip);
@@ -951,8 +957,10 @@ int32_t ctdb_control_startup(struct ctdb_context *ctdb, uint32_t vnn);
void ctdb_takeover_client_destructor_hook(struct ctdb_client *client);
int ctdb_event_script(struct ctdb_context *ctdb, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
int ctdb_event_script_callback(struct ctdb_context *ctdb,
- void (*callback)(struct ctdb_context *, int),
- const char *fmt, ...) PRINTF_ATTRIBUTE(3,4);
+ TALLOC_CTX *mem_ctx,
+ void (*callback)(struct ctdb_context *, int, void *),
+ void *private_data,
+ const char *fmt, ...) PRINTF_ATTRIBUTE(5,6);
void ctdb_release_all_ips(struct ctdb_context *ctdb);
void set_nonblocking(int fd);