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)
committerMichael Adam <obnox@samba.org>
Mon, 26 Aug 2013 11:35:51 +0000 (13:35 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit c6f8407648abb37f2ed781afa5171dad8c9f59e9)

server/ctdb_banning.c

index 635a3586b9ea5400ce225736aeaf5e98272c28c5..eb7913c92087619efb85a9eb9767f1b991a66511 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;
                        }