summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/protocol/protocol.h3
-rw-r--r--ctdb/server/ctdb_monitor.c7
2 files changed, 1 insertions, 9 deletions
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h
index 7551cc463cd..266fc4b26b6 100644
--- a/ctdb/protocol/protocol.h
+++ b/ctdb/protocol/protocol.h
@@ -371,9 +371,6 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,
CTDB_CONTROL_DB_ATTACH_REPLICATED = 150,
};
-#define CTDB_MONITORING_ENABLED 0
-#define CTDB_MONITORING_DISABLED 1
-
#define MAX_COUNT_BUCKETS 16
#define MAX_HOT_KEYS 10
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index b749d233618..2ecbbb393c0 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -37,7 +37,6 @@
#include "common/logging.h"
struct ctdb_monitor_state {
- uint32_t monitoring_mode;
TALLOC_CTX *monitor_context;
uint32_t next_interval;
uint32_t event_script_timeouts;
@@ -241,8 +240,6 @@ static void ctdb_startup_callback(struct ctdb_context *ctdb, int status, void *p
ctdb->monitor->next_interval = 2;
ctdb_run_notification_script(ctdb, "startup");
- ctdb->monitor->monitoring_mode = CTDB_MONITORING_ENABLED;
-
tevent_add_timer(ctdb->ev, ctdb->monitor->monitor_context,
timeval_current_ofs(ctdb->monitor->next_interval, 0),
ctdb_check_health, ctdb);
@@ -388,8 +385,7 @@ static void ctdb_check_health(struct tevent_context *ev,
if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL ||
ctdb->nodes[ctdb->pnn]->flags & NODE_FLAGS_INACTIVE ||
- ctdb->runstate != CTDB_RUNSTATE_RUNNING ||
- ctdb->monitor->monitoring_mode == CTDB_MONITORING_DISABLED) {
+ ctdb->runstate != CTDB_RUNSTATE_RUNNING) {
skip_monitoring = true;
} else {
if (ctdb_db_all_frozen(ctdb)) {
@@ -427,7 +423,6 @@ void ctdb_stop_monitoring(struct ctdb_context *ctdb)
talloc_free(ctdb->monitor->monitor_context);
ctdb->monitor->monitor_context = NULL;
- ctdb->monitor->monitoring_mode = CTDB_MONITORING_DISABLED;
ctdb->monitor->next_interval = 5;
DEBUG(DEBUG_NOTICE,("Monitoring has been stopped\n"));
}