ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-17342 Ambari agent log contains failures for AMS status commands (dsen)
Date Wed, 22 Jun 2016 07:07:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 13fc644c6 -> b3370d967


AMBARI-17342 Ambari agent log contains failures for AMS status commands (dsen)


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

Branch: refs/heads/trunk
Commit: b3370d96735b2e7691399af34e383dd10c143663
Parents: 13fc644
Author: Dmytro Sen <dsen@apache.org>
Authored: Wed Jun 22 10:07:05 2016 +0300
Committer: Dmytro Sen <dsen@apache.org>
Committed: Wed Jun 22 10:07:05 2016 +0300

----------------------------------------------------------------------
 .../AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py   | 5 +++++
 .../stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py       | 1 +
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b3370d96/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
index 825a48e..9d5aeaa 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
@@ -95,6 +95,11 @@ class AmsCollectorDefault(AmsCollector):
     security_params = get_params_from_filesystem(status_params.ams_hbase_conf_dir,
                                                  {'hbase-site.xml': FILE_TYPE_XML})
 
+    # In case of blueprint deployment security_status might be called before AMS collector
is installed.
+    if ('hbase-site' not in security_params or 'hbase.cluster.distributed' not in security_params['hbase-site'])
:
+      self.put_structured_out({"securityState": "UNKNOWN"})
+      return
+
     is_hbase_distributed = security_params['hbase-site']['hbase.cluster.distributed']
     # for embedded mode, when HBase is backed by file, security state is SECURED_KERBEROS
by definition when cluster is secured
     if status_params.security_enabled and not is_hbase_distributed:

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3370d96/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
index 195d388..37e6ee1 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_collector.py
@@ -374,6 +374,7 @@ class TestMetricsCollector(RMFTestCase):
                                   owner = 'ams',
                                   action = ['delete']
         )
+        
     self.assertResourceCalled('File', '/etc/ams-hbase/conf/log4j.properties',
                               owner = 'ams',
                               group = 'hadoop',


Mime
View raw message