ctdb-daemon: Skip monitoring when node is inactive
authorMartin Schwenke <martin@meltin.net>
Mon, 6 Jul 2015 05:37:23 +0000 (15:37 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 14 Sep 2017 12:49:15 +0000 (14:49 +0200)
This is currently handled by explicitly disabling monitoring in
various places.  However, those places shouldn't need to know about
monitoring but it is OK for monitoring to know about global node
states.

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

index 223220cac26d67c7f0ca1f2c09a20b98c0de86ad..1b29df50872b502c739f9648ff0c20d12285a55f 100644 (file)
@@ -387,6 +387,7 @@ static void ctdb_check_health(struct tevent_context *ev,
        int ret = 0;
 
        if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL ||
+           ctdb->nodes[ctdb->pnn]->flags & NODE_FLAGS_INACTIVE ||
            ctdb->monitor->monitoring_mode == CTDB_MONITORING_DISABLED) {
                skip_monitoring = true;
        } else {