Blame SOURCES/0009-Log-upgrade-important-messages-and-downgrade-unimpor.patch

6f8c14
From 2dbdee29736fcbf0fe1d41c306959b22d05f72b0 Mon Sep 17 00:00:00 2001
6f8c14
From: "Gao,Yan" <ygao@suse.com>
6f8c14
Date: Mon, 30 Apr 2018 18:02:04 +0200
6f8c14
Subject: [PATCH] Log: upgrade important messages and downgrade unimportant
6f8c14
 ones
6f8c14
6f8c14
It also fixes a message that's supposed to be "quorum.two_node not
6f8c14
present in cmap".
6f8c14
---
6f8c14
 src/sbd-cluster.c    | 11 ++++++-----
6f8c14
 src/sbd-common.c     |  4 ++--
6f8c14
 src/sbd-inquisitor.c |  6 +++---
6f8c14
 src/sbd-md.c         |  6 +++---
6f8c14
 src/sbd-pacemaker.c  |  2 +-
6f8c14
 5 files changed, 15 insertions(+), 14 deletions(-)
6f8c14
6f8c14
diff --git a/src/sbd-cluster.c b/src/sbd-cluster.c
6f8c14
index ae4750e..c7328af 100644
6f8c14
--- a/src/sbd-cluster.c
6f8c14
+++ b/src/sbd-cluster.c
6f8c14
@@ -201,10 +201,11 @@ sbd_get_two_node(void)
6f8c14
     }
6f8c14
 
6f8c14
     if (cmap_get_uint8(cmap_handle, "quorum.two_node", &two_node_u8) == CS_OK) {
6f8c14
-        cl_log(LOG_NOTICE, "Corosync is%s in 2Node-mode", two_node_u8?"":" not");
6f8c14
+        cl_log(two_node_u8? LOG_NOTICE : LOG_INFO,
6f8c14
+               "Corosync is%s in 2Node-mode", two_node_u8?"":" not");
6f8c14
         two_node = two_node_u8;
6f8c14
     } else {
6f8c14
-        cl_log(LOG_NOTICE, "quorum.two_node present in cmap\n");
6f8c14
+        cl_log(LOG_INFO, "quorum.two_node not present in cmap\n");
6f8c14
     }
6f8c14
     return TRUE;
6f8c14
 
6f8c14
@@ -264,7 +265,7 @@ sbd_membership_connect(void)
6f8c14
 {
6f8c14
     bool connected = false;
6f8c14
 
6f8c14
-    cl_log(LOG_NOTICE, "Attempting cluster connection");
6f8c14
+    cl_log(LOG_INFO, "Attempting cluster connection");
6f8c14
 
6f8c14
     cluster.destroy = sbd_membership_destroy;
6f8c14
 
6f8c14
@@ -308,7 +309,7 @@ sbd_membership_connect(void)
6f8c14
         }
6f8c14
     }
6f8c14
 
6f8c14
-    set_servant_health(pcmk_health_transient, LOG_NOTICE, "Connected, waiting for initial membership");
6f8c14
+    set_servant_health(pcmk_health_transient, LOG_INFO, "Connected, waiting for initial membership");
6f8c14
     notify_parent();
6f8c14
 
6f8c14
     notify_timer_cb(NULL);
6f8c14
@@ -530,7 +531,7 @@ servant_cluster(const char *diskname, int mode, const void* argp)
6f8c14
     enum cluster_type_e cluster_stack = get_cluster_type();
6f8c14
 
6f8c14
     crm_system_name = strdup("sbd:cluster");
6f8c14
-    cl_log(LOG_INFO, "Monitoring %s cluster health", name_for_cluster_type(cluster_stack));
6f8c14
+    cl_log(LOG_NOTICE, "Monitoring %s cluster health", name_for_cluster_type(cluster_stack));
6f8c14
     set_proc_title("sbd: watcher: Cluster");
6f8c14
 
6f8c14
     sbd_membership_connect();
6f8c14
diff --git a/src/sbd-common.c b/src/sbd-common.c
6f8c14
index f22c4f2..0ce6478 100644
6f8c14
--- a/src/sbd-common.c
6f8c14
+++ b/src/sbd-common.c
6f8c14
@@ -893,7 +893,7 @@ notify_parent(void)
6f8c14
         case pcmk_health_pending:
6f8c14
         case pcmk_health_shutdown:
6f8c14
         case pcmk_health_transient:
6f8c14
-            DBGLOG(LOG_INFO, "Not notifying parent: state transient (%d)", servant_health);
6f8c14
+            DBGLOG(LOG_DEBUG, "Not notifying parent: state transient (%d)", servant_health);
6f8c14
             break;
6f8c14
 
6f8c14
         case pcmk_health_unknown:
6f8c14
@@ -904,7 +904,7 @@ notify_parent(void)
6f8c14
             break;
6f8c14
 
6f8c14
         case pcmk_health_online:
6f8c14
-            DBGLOG(LOG_INFO, "Notifying parent: healthy");
6f8c14
+            DBGLOG(LOG_DEBUG, "Notifying parent: healthy");
6f8c14
             sigqueue(ppid, SIG_LIVENESS, signal_value);
6f8c14
             break;
6f8c14
 
6f8c14
diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
6f8c14
index 237bf43..90c7d26 100644
6f8c14
--- a/src/sbd-inquisitor.c
6f8c14
+++ b/src/sbd-inquisitor.c
6f8c14
@@ -64,7 +64,7 @@ void recruit_servant(const char *devname, pid_t pid)
6f8c14
 
6f8c14
 	servant_count++;
6f8c14
         if(sbd_is_disk(newbie)) {
6f8c14
-            cl_log(LOG_NOTICE, "Monitoring %s", devname);
6f8c14
+            cl_log(LOG_INFO, "Monitoring %s", devname);
6f8c14
             disk_count++;
6f8c14
         } else {
6f8c14
             newbie->outdated = 1;
6f8c14
@@ -565,7 +565,7 @@ void inquisitor_child(void)
6f8c14
                     if(cluster_alive(true)) {
6f8c14
                         /* We LIVE! */
6f8c14
                         if(cluster_appeared == false) {
6f8c14
-                            cl_log(LOG_NOTICE, "Active cluster detected");
6f8c14
+                            cl_log(LOG_INFO, "Active cluster detected");
6f8c14
                         }
6f8c14
                         tickle = 1;
6f8c14
                         can_detach = 1;
6f8c14
@@ -574,7 +574,7 @@ void inquisitor_child(void)
6f8c14
                     } else if(cluster_alive(false)) {
6f8c14
                         if(!decoupled) {
6f8c14
                             /* On the way up, detach and arm the watchdog */
6f8c14
-                            cl_log(LOG_NOTICE, "Partial cluster detected, detaching");
6f8c14
+                            cl_log(LOG_INFO, "Partial cluster detected, detaching");
6f8c14
                         }
6f8c14
 
6f8c14
                         can_detach = 1;
6f8c14
diff --git a/src/sbd-md.c b/src/sbd-md.c
6f8c14
index 6a964dd..6f152c4 100644
6f8c14
--- a/src/sbd-md.c
6f8c14
+++ b/src/sbd-md.c
6f8c14
@@ -1097,7 +1097,7 @@ int servant(const char *diskname, int mode, const void* argp)
6f8c14
 		exit(EXIT_MD_IO_FAIL);
6f8c14
 	}
6f8c14
 
6f8c14
-	DBGLOG(LOG_INFO, "Monitoring slot %d on disk %s", mbox, diskname);
6f8c14
+	cl_log(LOG_NOTICE, "Monitoring slot %d on disk %s", mbox, diskname);
6f8c14
 	if (s_header->minor_version == 0) {
6f8c14
 		set_proc_title("sbd: watcher: %s - slot: %d", diskname, mbox);
6f8c14
 	} else {
6f8c14
@@ -1180,7 +1180,7 @@ int servant(const char *diskname, int mode, const void* argp)
6f8c14
 		}
6f8c14
 
6f8c14
 		if (s_mbox->cmd > 0) {
6f8c14
-			cl_log(LOG_INFO,
6f8c14
+			cl_log(LOG_NOTICE,
6f8c14
 			       "Received command %s from %s on disk %s",
6f8c14
 			       char2cmd(s_mbox->cmd), s_mbox->from, diskname);
6f8c14
 
6f8c14
@@ -1222,7 +1222,7 @@ int servant(const char *diskname, int mode, const void* argp)
6f8c14
 			       (int)latency, (int)timeout_watchdog_warn,
6f8c14
 			       diskname);
6f8c14
 		} else if (debug) {
6f8c14
-			DBGLOG(LOG_INFO, "Latency: %d on disk %s", (int)latency,
6f8c14
+			DBGLOG(LOG_DEBUG, "Latency: %d on disk %s", (int)latency,
6f8c14
 			       diskname);
6f8c14
 		}
6f8c14
 	}
6f8c14
diff --git a/src/sbd-pacemaker.c b/src/sbd-pacemaker.c
6f8c14
index 2f06109..a435d01 100644
6f8c14
--- a/src/sbd-pacemaker.c
6f8c14
+++ b/src/sbd-pacemaker.c
6f8c14
@@ -416,7 +416,7 @@ servant_pcmk(const char *diskname, int mode, const void* argp)
6f8c14
 	int exit_code = 0;
6f8c14
 
6f8c14
         crm_system_name = strdup("sbd:pcmk");
6f8c14
-	cl_log(LOG_INFO, "Monitoring Pacemaker health");
6f8c14
+	cl_log(LOG_NOTICE, "Monitoring Pacemaker health");
6f8c14
 	set_proc_title("sbd: watcher: Pacemaker");
6f8c14
         setenv("PCMK_watchdog", "true", 1);
6f8c14
 
6f8c14
-- 
6f8c14
1.8.3.1
6f8c14