banning: Log ban state changes for other nodes at higher debug level
authorAmitay Isaacs <amitay@gmail.com>
Mon, 24 Jun 2013 04:31:50 +0000 (14:31 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 2 Jul 2013 07:44:31 +0000 (17:44 +1000)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit c6f8407648abb37f2ed781afa5171dad8c9f59e9)

server/ctdb_banning.c

index fc2db5cb799990034c13dfc4ab021dc04a80bfc5..561fe148b58c9c8537e5634dec2abaf2720eec74 100644 (file)
@@ -77,12 +77,16 @@ int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata)
                        return -1;
                }
                if (bantime->time == 0) {
-                       DEBUG(DEBUG_INFO,("unbanning node %d\n", bantime->pnn));
+                       DEBUG(DEBUG_NOTICE,("unbanning node %d\n", bantime->pnn));
                        ctdb->nodes[bantime->pnn]->flags &= ~NODE_FLAGS_BANNED;
                } else {
-                       DEBUG(DEBUG_INFO,("banning node %d\n", bantime->pnn));
+                       DEBUG(DEBUG_NOTICE,("banning node %d\n", bantime->pnn));
                        if (ctdb->tunable.enable_bans == 0) {
-                               DEBUG(DEBUG_INFO,("Bans are disabled - ignoring ban of node %u\n", bantime->pnn));
+                               /* FIXME: This is bogus. We really should be
+                                * taking decision based on the tunables on
+                                * the banned node and not local node.
+                                */
+                               DEBUG(DEBUG_WARNING,("Bans are disabled - ignoring ban of node %u\n", bantime->pnn));
                                return 0;
                        }