during shutdown there is a window after we have stopped TCP and disconnected from...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 28 Oct 2010 02:38:34 +0000 (13:38 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 28 Oct 2010 02:41:08 +0000 (13:41 +1100)
During this window we may still hit asynchronous events that will fail because we can not send/receive packets from other nodes.

These messages are logged as ... Transport is DOWN. To help indicate that they are benign messages related to the process of shutting down.

These messages spam the syslog during normal shutdown, so this patch will drop the loglevel of these messages to DEBUG, so that they will not appear in or spam the syslog.

server/ctdb_call.c
server/ctdb_control.c
server/ctdb_daemon.c

index 0bb7902dc3f54c01792b6d61cb109eebae1a01de..c5f7e7d43041bb88d810009e2b1dbe0953208de9 100644 (file)
@@ -70,7 +70,7 @@ static void ctdb_send_error(struct ctdb_context *ctdb,
        int msglen, len;
 
        if (ctdb->methods == NULL) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed to send error. Transport is DOWN\n"));
+               DEBUG(DEBUG_INFO,(__location__ " Failed to send error. Transport is DOWN\n"));
                return;
        }
 
@@ -413,7 +413,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
        struct ctdb_db_context *ctdb_db;
 
        if (ctdb->methods == NULL) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed ctdb_request_call. Transport is DOWN\n"));
+               DEBUG(DEBUG_INFO,(__location__ " Failed ctdb_request_call. Transport is DOWN\n"));
                return;
        }
 
@@ -730,7 +730,7 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(struct ctdb_db_context *ctd
        struct ctdb_context *ctdb = ctdb_db->ctdb;
 
        if (ctdb->methods == NULL) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed send packet. Transport is down\n"));
+               DEBUG(DEBUG_INFO,(__location__ " Failed send packet. Transport is down\n"));
                return NULL;
        }
 
@@ -814,7 +814,7 @@ void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode)
        struct ctdb_req_keepalive *r;
        
        if (ctdb->methods == NULL) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed to send keepalive. Transport is DOWN\n"));
+               DEBUG(DEBUG_INFO,(__location__ " Failed to send keepalive. Transport is DOWN\n"));
                return;
        }
 
index 3356ba1baef65b356ecc3e2612b86cbc5500eafa..90900c94b1d5a409e1c01350b0c11a10e8be85c0 100644 (file)
@@ -750,7 +750,7 @@ int ctdb_daemon_send_control(struct ctdb_context *ctdb, uint32_t destnode,
        size_t len;
 
        if (ctdb->methods == NULL) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed to send control. Transport is DOWN\n"));
+               DEBUG(DEBUG_INFO,(__location__ " Failed to send control. Transport is DOWN\n"));
                return -1;
        }
 
index 12ad9543c46005f65ae272f47d0e79c7371ac024..5eca7275c685dd5cdf3524e3abf1a3d00a7ba6d1 100644 (file)
@@ -874,7 +874,7 @@ struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
        size = (length+(CTDB_DS_ALIGNMENT-1)) & ~(CTDB_DS_ALIGNMENT-1);
 
        if (ctdb->methods == NULL) {
-               DEBUG(DEBUG_ERR,(__location__ " Unable to allocate transport packet for operation %u of length %u. Transport is DOWN.\n",
+               DEBUG(DEBUG_INFO,(__location__ " Unable to allocate transport packet for operation %u of length %u. Transport is DOWN.\n",
                         operation, (unsigned)length));
                return NULL;
        }
@@ -1099,7 +1099,7 @@ int ctdb_daemon_send_message(struct ctdb_context *ctdb, uint32_t pnn,
        int len;
 
        if (ctdb->methods == NULL) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed to send message. Transport is DOWN\n"));
+               DEBUG(DEBUG_INFO,(__location__ " Failed to send message. Transport is DOWN\n"));
                return -1;
        }