Changing log severity level in case of liveness/readiness issues 47/7547/1
authorwahidw <abdulwahid.w@nokia.com>
Wed, 12 Jan 2022 06:18:20 +0000 (06:18 +0000)
committerwahidw <abdulwahid.w@nokia.com>
Wed, 12 Jan 2022 06:22:14 +0000 (06:22 +0000)
Signed-off-by: wahidw <abdulwahid.w@nokia.com>
Change-Id: I649dd94059263244645e7a8236ad058c3f0df55d

a1/a1rmr.py
a1/controller.py
a1/data.py

index e4a7448..049ea2f 100644 (file)
@@ -276,7 +276,6 @@ class _RmrLoop:
 
                 # we must free each sbuf
                 rmr.rmr_free_msg(sbuf)
-
             self.last_ran = time.time()
             time.sleep(1)
 
index 49f7d24..19b8a26 100644 (file)
@@ -27,6 +27,7 @@ from a1 import a1rmr, exceptions, data
 
 
 mdc_logger = Logger(name=__name__)
+mdc_logger.mdclog_format_init(configmap_monitor=True)
 
 a1_counters = Counter('A1Policy', 'Policy type and instance counters', ['counter'])
 
@@ -76,10 +77,10 @@ def get_healthcheck():
     3. checks that our SDL connection is healthy
     """
     if not a1rmr.healthcheck_rmr_thread():
-        mdc_logger.debug("A1 is not healthy due to the rmr thread")
+        mdc_logger.error("A1 is not healthy due to the rmr thread")
         return "rmr thread is unhealthy", 500
     if not data.SDL.healthcheck():
-        mdc_logger.debug("A1 is not healthy because it does not have a connection to SDL")
+        mdc_logger.error("A1 is not healthy because it does not have a connection to SDL")
         return "sdl connection is unhealthy", 500
     return "", 200
 
index 436912f..8ec30cc 100644 (file)
@@ -37,6 +37,7 @@ HANDLER_PREFIX = "a1.policy_handler."
 
 
 mdc_logger = Logger(name=__name__)
+mdc_logger.mdclog_format_init(configmap_monitor=True)
 if USE_FAKE_SDL:
     mdc_logger.debug("Using fake SDL")
 SDL = SDLWrapper(use_fake_sdl=USE_FAKE_SDL)