ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-9147 - Ambari-agent errors out, but starts (Yurii Shylov via jonathanhurley)
Date Thu, 15 Jan 2015 16:20:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 261f04b7d -> e2b3f4deb


AMBARI-9147 - Ambari-agent errors out, but starts (Yurii Shylov via jonathanhurley)


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

Branch: refs/heads/trunk
Commit: e2b3f4deb6175f8f3291a5bddfbe09330414dadd
Parents: 261f04b
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Thu Jan 15 11:20:50 2015 -0500
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Thu Jan 15 11:20:50 2015 -0500

----------------------------------------------------------------------
 .../src/main/python/ambari_agent/AlertSchedulerHandler.py      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e2b3f4de/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
index 11f7de3..66b1758 100644
--- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
+++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
@@ -224,12 +224,12 @@ class AlertSchedulerHandler():
     definitions = []
     
     all_commands = None
+    alerts_definitions_path = os.path.join(self.cachedir, self.FILENAME)
     try:
-      with open(os.path.join(self.cachedir, self.FILENAME)) as fp:
+      with open(alerts_definitions_path) as fp:
         all_commands = json.load(fp)
     except:
-      if (logger.isEnabledFor(logging.DEBUG)):
-        traceback.print_exc()
+      logger.warning('Alert definitions file was not found under "{0}". No alerts will be
scheduled.'.format(alerts_definitions_path))
       return definitions
     
     for command_json in all_commands:


Mime
View raw message