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/05/27 17:25:22 UTC
ambari git commit: AMBARI-11349. ambari-agent.out file grows
geometrically and quickly fills up disk (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk f62a6057a -> 2b9a6cac6
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/2b9a6cac
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2b9a6cac
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2b9a6cac
Branch: refs/heads/trunk
Commit: 2b9a6cac69c50e0a43905548d53701d95d29950b
Parents: f62a605
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed May 27 18:24:56 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed May 27 18:24:56 2015 +0300
----------------------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2b9a6cac/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 969a01f..fafecac 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
@@ -24,6 +24,7 @@ import os
import re
from alerts.base_alert import BaseAlert
from resource_management.core.environment import Environment
+from resource_management.core.logger import Logger
logger = logging.getLogger(__name__)
@@ -98,6 +99,8 @@ 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: