From bafa467021b7b2f17c61904b9f70f695a4395921 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 23 Dec 2013 11:46:48 +1100 Subject: [PATCH] ctdb-daemon: Deprecate RELOAD and STATUS events These events have never been used. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/include/ctdb_protocol.h | 4 ++-- ctdb/server/eventscript.c | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h index 15c87be6871..fa03a4b2f13 100644 --- a/ctdb/include/ctdb_protocol.h +++ b/ctdb/include/ctdb_protocol.h @@ -240,9 +240,9 @@ enum ctdb_eventscript_call { CTDB_EVENT_RELEASE_IP, /* IP released: interface, IP address, netmask bits. */ CTDB_EVENT_STOPPED, /* Deprecated, do not use. */ CTDB_EVENT_MONITOR, /* Please check if service is healthy: no args. */ - CTDB_EVENT_STATUS, /* Report service status: no args. */ + CTDB_EVENT_STATUS, /* Deprecated, do not use. */ CTDB_EVENT_SHUTDOWN, /* CTDB shutting down: no args. */ - CTDB_EVENT_RELOAD, /* magic */ + CTDB_EVENT_RELOAD, /* Deprecated, do not use */ CTDB_EVENT_UPDATE_IP, /* IP updating: old interface, new interface, IP address, netmask bits. */ CTDB_EVENT_IPREALLOCATED, /* when a takeover_run() completes */ CTDB_EVENT_MAX diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index d13e9444830..4e61941a6ee 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -630,7 +630,6 @@ static void ctdb_event_script_timeout(struct event_context *ev, struct timed_eve case CTDB_EVENT_RECOVERED: case CTDB_EVENT_TAKE_IP: case CTDB_EVENT_RELEASE_IP: - case CTDB_EVENT_STATUS: state->scripts->scripts[state->current].status = 0; DEBUG(DEBUG_ERR,("Ignoring hung script for %s call %d\n", state->options, state->call)); break; @@ -745,9 +744,7 @@ static bool check_options(enum ctdb_eventscript_call call, const char *options) case CTDB_EVENT_START_RECOVERY: case CTDB_EVENT_RECOVERED: case CTDB_EVENT_MONITOR: - case CTDB_EVENT_STATUS: case CTDB_EVENT_SHUTDOWN: - case CTDB_EVENT_RELOAD: case CTDB_EVENT_IPREALLOCATED: return count_words(options) == 0; @@ -867,7 +864,7 @@ static int ctdb_event_script_callback_v(struct ctdb_context *ctdb, state->current = 0; state->child = 0; - if (!from_user && (call == CTDB_EVENT_MONITOR || call == CTDB_EVENT_STATUS)) { + if (!from_user && (call == CTDB_EVENT_MONITOR)) { ctdb->current_monitor = state; } -- 2.11.4.GIT