Repository: ambari Updated Branches: refs/heads/trunk 591ab4810 -> 84d774ce1
AMBARI-11381. Move some debug logs to info level Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/84d774ce Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/84d774ce Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/84d774ce Branch: refs/heads/trunk Commit: 84d774ce140cc3ebd0590edb3d85f82e048dbb4d Parents: 591ab48 Author: Sumit Mohanty <[email protected]> Authored: Tue May 26 10:03:14 2015 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Tue May 26 10:03:50 2015 -0700 ---------------------------------------------------------------------- ambari-agent/src/main/python/ambari_agent/ActionQueue.py | 6 +++--- ambari-agent/src/main/python/ambari_agent/Controller.py | 10 +++++----- ambari-agent/src/main/python/ambari_agent/DataCleaner.py | 6 +++--- ambari-agent/src/main/python/ambari_agent/Heartbeat.py | 2 +- ambari-agent/src/main/python/ambari_agent/NetUtil.py | 2 +- .../src/main/python/ambari_agent/PingPortListener.py | 2 +- .../main/python/ambari_agent/StackVersionsFileHandler.py | 2 +- .../main/python/ambari_agent/apscheduler/threadpool.py | 2 +- ambari-agent/src/main/python/ambari_agent/security.py | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/ActionQueue.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py index bdf8767..e486f34 100644 --- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py +++ b/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 http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/Controller.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 014a9dd..30aedd0 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/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 http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/DataCleaner.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/DataCleaner.py b/ambari-agent/src/main/python/ambari_agent/DataCleaner.py index 347bcc3..0b66fa7 100644 --- a/ambari-agent/src/main/python/ambari_agent/DataCleaner.py +++ b/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) http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/Heartbeat.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/Heartbeat.py b/ambari-agent/src/main/python/ambari_agent/Heartbeat.py index bc54862..ffef323 100644 --- a/ambari-agent/src/main/python/ambari_agent/Heartbeat.py +++ b/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): http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/NetUtil.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/NetUtil.py b/ambari-agent/src/main/python/ambari_agent/NetUtil.py index 405b071..def43f3 100644 --- a/ambari-agent/src/main/python/ambari_agent/NetUtil.py +++ b/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: http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/PingPortListener.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/PingPortListener.py b/ambari-agent/src/main/python/ambari_agent/PingPortListener.py index be65e2b..46be26b 100644 --- a/ambari-agent/src/main/python/ambari_agent/PingPortListener.py +++ b/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): http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/StackVersionsFileHandler.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/StackVersionsFileHandler.py b/ambari-agent/src/main/python/ambari_agent/StackVersionsFileHandler.py index 3b696fc..8afb140 100644 --- a/ambari-agent/src/main/python/ambari_agent/StackVersionsFileHandler.py +++ b/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() http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py index e1a0e5b..8ec47da 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py +++ b/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): http://git-wip-us.apache.org/repos/asf/ambari/blob/84d774ce/ambari-agent/src/main/python/ambari_agent/security.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/security.py b/ambari-agent/src/main/python/ambari_agent/security.py index ac107ca..dbb2192 100644 --- a/ambari-agent/src/main/python/ambari_agent/security.py +++ b/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:
