Procházet zdrojové kódy

AMBARI-11381. Move some debug logs to info level

Sumit Mohanty před 10 roky
rodič
revize
84d774ce14

+ 3 - 3
ambari-agent/src/main/python/ambari_agent/ActionQueue.py

@@ -94,7 +94,7 @@ class ActionQueue(threading.Thread):
     self.statusCommandQueue.queue.clear()
 
     for command in commands:
-      logger.debug("Adding " + command['commandType'] + " for service " + \
+      logger.info("Adding " + command['commandType'] + " for service " + \
                   command['serviceName'] + " of cluster " + \
                   command['clusterName'] + " to the queue.")
       self.statusCommandQueue.put(command)
@@ -106,7 +106,7 @@ class ActionQueue(threading.Thread):
       if not command.has_key('clusterName'):
         command['clusterName'] = 'null'
 
-      logger.debug("Adding " + command['commandType'] + " for role " + \
+      logger.info("Adding " + command['commandType'] + " for role " + \
                   command['role'] + " for service " + \
                   command['serviceName'] + " of cluster " + \
                   command['clusterName'] + " to the queue.")
@@ -229,7 +229,7 @@ class ActionQueue(threading.Thread):
               "cluster {cluster}.".format(
               commandId = str(commandId), role=command['role'],
               cluster=clusterName)
-    logger.debug(message)
+    logger.info(message)
 
     taskId = command['taskId']
     # Preparing 'IN_PROGRESS' report

+ 5 - 5
ambari-agent/src/main/python/ambari_agent/Controller.py

@@ -122,7 +122,7 @@ class Controller(threading.Thread):
 
         try:
           server_ip = socket.gethostbyname(self.hostname)
-          logger.debug("Registering with %s (%s) (agent=%s)", self.hostname, server_ip, prettyData)
+          logger.info("Registering with %s (%s) (agent=%s)", self.hostname, server_ip, prettyData)
         except socket.error:
           logger.warn("Unable to determine the IP address of '%s', agent registration may fail (agent=%s)",
                       self.hostname, prettyData)
@@ -148,7 +148,7 @@ class Controller(threading.Thread):
           return ret
 
         self.responseId = int(ret['responseId'])
-        logger.debug("Registration Successful (response id = %s)", self.responseId)
+        logger.info("Registration Successful (response id = %s)", self.responseId)
 
         self.isRegistered = True
         if 'statusCommands' in ret.keys():
@@ -241,7 +241,7 @@ class Controller(threading.Thread):
 
         serverId = int(response['responseId'])
 
-        logger.debug('Heartbeat response received (id = %s)', serverId)
+        logger.info('Heartbeat response received (id = %s)', serverId)
 
         if 'hasMappedComponents' in response.keys():
           self.hasMappedComponents = response['hasMappedComponents'] is not False
@@ -366,12 +366,12 @@ class Controller(threading.Thread):
   def registerAndHeartbeat(self):
     registerResponse = self.registerWithServer()
     message = registerResponse['response']
-    logger.debug("Registration response from %s was %s", self.serverHostname, message)
+    logger.info("Registration response from %s was %s", self.serverHostname, message)
 
     if self.isRegistered:
       # Clearing command queue to stop executing "stale" commands
       # after registration
-      logger.debug('Resetting ActionQueue...')
+      logger.info('Resetting ActionQueue...')
       self.actionQueue.reset()
 
       # Process callbacks

+ 3 - 3
ambari-agent/src/main/python/ambari_agent/DataCleaner.py

@@ -36,7 +36,7 @@ class DataCleaner(threading.Thread):
   def __init__(self, config):
     threading.Thread.__init__(self)
     self.daemon = True
-    logger.debug('Data cleanup thread started')
+    logger.info('Data cleanup thread started')
     self.config = config
 
     self.file_max_age = config.get('agent', 'data_cleanup_max_age', 86400)
@@ -117,9 +117,9 @@ class DataCleaner(threading.Thread):
 
   def run(self):
     while not self.stopped:
-      logger.debug('Data cleanup started')
+      logger.info('Data cleanup started')
       self.cleanup()
-      logger.debug('Data cleanup finished')
+      logger.info('Data cleanup finished')
       time.sleep(self.cleanup_interval)
 
 

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/Heartbeat.py

@@ -74,7 +74,7 @@ class Heartbeat:
     if int(id) == 0:
       componentsMapped = False
 
-    logger.debug("Building Heartbeat: {responseId = %s, timestamp = %s, commandsInProgress = %s, componentsMapped = %s}",
+    logger.info("Building Heartbeat: {responseId = %s, timestamp = %s, commandsInProgress = %s, componentsMapped = %s}",
         str(id), str(timestamp), repr(commandsInProgress), repr(componentsMapped))
 
     if logger.isEnabledFor(logging.DEBUG):

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/NetUtil.py

@@ -56,7 +56,7 @@ class NetUtil:
 
        Additionally returns body of request, if available
     """
-    logger.debug("Connecting to " + url)
+    logger.info("Connecting to " + url)
     responseBody = ""
 
     try:

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/PingPortListener.py

@@ -47,7 +47,7 @@ class PingPortListener(threading.Thread):
     self.socket.bind((self.host, self.port))
     self.socket.listen(1)
     config.set('agent','current_ping_port',str(self.socket.getsockname()[1]))
-    logger.debug("Ping port listener started on port: " + str(self.socket.getsockname()[1]))
+    logger.info("Ping port listener started on port: " + str(self.socket.getsockname()[1]))
 
 
   def run_os_command_in_shell(self, command):

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/StackVersionsFileHandler.py

@@ -104,7 +104,7 @@ class StackVersionsFileHandler:
      Called to create file when it does not exist
     '''
     if not os.path.isfile(self.versionsFilePath):
-      logger.debug("Creating stacks versions file at %s" % self.versionsFilePath)
+      logger.info("Creating stacks versions file at %s" % self.versionsFilePath)
       open(self.versionsFilePath, 'w').close()
 
 

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py

@@ -48,7 +48,7 @@ class ThreadPool(object):
         self._shutdown = False
 
         _threadpools.add(ref(self))
-        logger.debug('Started thread pool with %d core threads and %s maximum '
+        logger.info('Started thread pool with %d core threads and %s maximum '
                     'threads', core_threads, max_threads or 'unlimited')
 
     def _adjust_threadcount(self):

+ 3 - 3
ambari-agent/src/main/python/ambari_agent/security.py

@@ -52,11 +52,11 @@ class VerifiedHTTPSConnection(httplib.HTTPSConnection):
       try:
         sock = self.create_connection()
         self.sock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_NONE)
-        logger.debug('SSL connection established. Two-way SSL authentication is '
+        logger.info('SSL connection established. Two-way SSL authentication is '
                     'turned off on the server.')
       except (ssl.SSLError, AttributeError):
         self.two_way_ssl_required = True
-        logger.error('Insecure connection to https://' + self.host + ':' + self.port +
+        logger.info('Insecure connection to https://' + self.host + ':' + self.port +
                     '/ failed. Reconnecting using two-way SSL authentication..')
 
     if self.two_way_ssl_required:
@@ -90,7 +90,7 @@ class VerifiedHTTPSConnection(httplib.HTTPSConnection):
   def create_connection(self):
     if self.sock:
       self.sock.close()
-    logger.debug("SSL Connect being called.. connecting to the server")
+    logger.info("SSL Connect being called.. connecting to the server")
     sock = socket.create_connection((self.host, self.port), 60)
     sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
     if self._tunnel_host: