You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/06/23 10:34:51 UTC

[1/2] ambari git commit: AMBARI-11349. ambari-agent.out file grows geometrically and quickly fills up disk (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 a8bab752e -> 5c52dbd7d
  refs/heads/trunk f97189fdc -> 069003257


AMBARI-11349. ambari-agent.out file grows geometrically and quickly fills up disk (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/06900325
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/06900325
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/06900325

Branch: refs/heads/trunk
Commit: 06900325786572bde7ad2e935782238cac720cad
Parents: f97189f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Jun 23 11:34:39 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Jun 23 11:34:39 2015 +0300

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py | 2 --
 ambari-common/src/main/python/resource_management/core/logger.py | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/06900325/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
index 1263195..76afbc9 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
@@ -99,8 +99,6 @@ class ScriptAlert(BaseAlert):
       matchObj = re.match( r'((.*)services(.*)package)', self.path_to_script)
       if matchObj:
         basedir = matchObj.group(1)
-        Logger.logger = logging.getLogger('resource_management')
-        Logger.logger.setLevel(logging.ERROR)
         with Environment(basedir, tmp_dir=self.config.get('agent', 'tmp_dir')) as env:
           return cmd_module.execute(configurations, self.parameters, self.host_name)
       else:

http://git-wip-us.apache.org/repos/asf/ambari/blob/06900325/ambari-common/src/main/python/resource_management/core/logger.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/logger.py b/ambari-common/src/main/python/resource_management/core/logger.py
index 1d6ace2..f3ea4e9 100644
--- a/ambari-common/src/main/python/resource_management/core/logger.py
+++ b/ambari-common/src/main/python/resource_management/core/logger.py
@@ -45,6 +45,7 @@ class Logger:
     cherr = logging.StreamHandler(sys.stderr)
     cherr.setLevel(logging.ERROR)
     cherr.setFormatter(formatter)
+    logger.handlers = []
     logger.addHandler(cherr)
     logger.addHandler(chout)
 


[2/2] ambari git commit: AMBARI-11349. ambari-agent.out file grows geometrically and quickly fills up disk (aonishuk)

Posted by ao...@apache.org.
AMBARI-11349. ambari-agent.out file grows geometrically and quickly fills up disk (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c52dbd7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c52dbd7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c52dbd7

Branch: refs/heads/branch-2.1
Commit: 5c52dbd7da7346c1608d643d6f5e3064d34c047b
Parents: a8bab75
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Jun 23 11:34:41 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Jun 23 11:34:41 2015 +0300

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py | 2 --
 ambari-common/src/main/python/resource_management/core/logger.py | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c52dbd7/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
index 1263195..76afbc9 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
@@ -99,8 +99,6 @@ class ScriptAlert(BaseAlert):
       matchObj = re.match( r'((.*)services(.*)package)', self.path_to_script)
       if matchObj:
         basedir = matchObj.group(1)
-        Logger.logger = logging.getLogger('resource_management')
-        Logger.logger.setLevel(logging.ERROR)
         with Environment(basedir, tmp_dir=self.config.get('agent', 'tmp_dir')) as env:
           return cmd_module.execute(configurations, self.parameters, self.host_name)
       else:

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c52dbd7/ambari-common/src/main/python/resource_management/core/logger.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/logger.py b/ambari-common/src/main/python/resource_management/core/logger.py
index 1d6ace2..f3ea4e9 100644
--- a/ambari-common/src/main/python/resource_management/core/logger.py
+++ b/ambari-common/src/main/python/resource_management/core/logger.py
@@ -45,6 +45,7 @@ class Logger:
     cherr = logging.StreamHandler(sys.stderr)
     cherr.setLevel(logging.ERROR)
     cherr.setFormatter(formatter)
+    logger.handlers = []
     logger.addHandler(cherr)
     logger.addHandler(chout)