ctdb-daemon: Deprecate RELOAD and STATUS events
authorAmitay Isaacs <amitay@gmail.com>
Mon, 23 Dec 2013 00:46:48 +0000 (11:46 +1100)
committerMartin Schwenke <martin@meltin.net>
Thu, 16 Jan 2014 00:41:12 +0000 (11:41 +1100)
These events have never been used.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/include/ctdb_protocol.h
ctdb/server/eventscript.c

index 15c87be6871c7da793d6717353ad01a9d997866b..fa03a4b2f13f4cc035191365d8c39fc63e01e1ae 100644 (file)
@@ -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
index d13e944483091e9aba085e80bba3f59597d8bf4a..4e61941a6ee112aaa8c20aefd2c8614774c1d52f 100644 (file)
@@ -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;
        }