summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_recover.c
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-02-21 14:28:13 +1100
committerAmitay Isaacs <amitay@gmail.com>2013-05-06 13:38:21 +1000
commitfa16cccf0227bf72fabd858ecd68c76d22a76f67 (patch)
tree5bb5a9b8a6e4733d22e12d2c595ab36f1f386384 /ctdb/server/ctdb_recover.c
parentfb028a208c57e52d031942c82ea4495c292656ea (diff)
downloadsamba-fa16cccf0227bf72fabd858ecd68c76d22a76f67.tar.gz
samba-fa16cccf0227bf72fabd858ecd68c76d22a76f67.tar.xz
samba-fa16cccf0227bf72fabd858ecd68c76d22a76f67.zip
ctdbd: Remove the "stopped" event
It isn't used, superceded by "ipreallocated". Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c2bb8596a8af6406ef50e53953884df9d6246a96)
Diffstat (limited to 'ctdb/server/ctdb_recover.c')
-rw-r--r--ctdb/server/ctdb_recover.c50
1 files changed, 1 insertions, 49 deletions
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c
index 1e5170fecca..2e9408fc9e7 100644
--- a/ctdb/server/ctdb_recover.c
+++ b/ctdb/server/ctdb_recover.c
@@ -1357,60 +1357,12 @@ int32_t ctdb_control_set_recmaster(struct ctdb_context *ctdb, uint32_t opcode, T
}
-struct stop_node_callback_state {
- struct ctdb_req_control *c;
-};
-
-/*
- called when the 'stopped' event script has finished
- */
-static void ctdb_stop_node_callback(struct ctdb_context *ctdb, int status, void *p)
+int32_t ctdb_control_stop_node(struct ctdb_context *ctdb)
{
- struct stop_node_callback_state *state = talloc_get_type(p, struct stop_node_callback_state);
-
- if (status != 0) {
- DEBUG(DEBUG_ERR,(__location__ " stopped event script failed (status %d)\n", status));
- ctdb->nodes[ctdb->pnn]->flags &= ~NODE_FLAGS_STOPPED;
- if (status == -ETIME) {
- ctdb_ban_self(ctdb);
- }
- }
-
- ctdb_request_control_reply(ctdb, state->c, NULL, status, NULL);
- talloc_free(state);
-}
-
-int32_t ctdb_control_stop_node(struct ctdb_context *ctdb, struct ctdb_req_control *c, bool *async_reply)
-{
- int ret;
- struct stop_node_callback_state *state;
-
DEBUG(DEBUG_INFO,(__location__ " Stopping node\n"));
-
- state = talloc(ctdb, struct stop_node_callback_state);
- CTDB_NO_MEMORY(ctdb, state);
-
- state->c = talloc_steal(state, c);
-
ctdb_disable_monitoring(ctdb);
-
- ret = ctdb_event_script_callback(ctdb, state,
- ctdb_stop_node_callback,
- state, false,
- CTDB_EVENT_STOPPED, "%s", "");
-
- if (ret != 0) {
- ctdb_enable_monitoring(ctdb);
-
- DEBUG(DEBUG_ERR,(__location__ " Failed to stop node\n"));
- talloc_free(state);
- return -1;
- }
-
ctdb->nodes[ctdb->pnn]->flags |= NODE_FLAGS_STOPPED;
- *async_reply = true;
-
return 0;
}