ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-14350. AMS is broken after redeploy cluster (Aravindan Vijayan via smohanty)
Date Sat, 12 Dec 2015 16:37:41 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 9e1ebd768 -> 5e4f9573b


AMBARI-14350. AMS is broken after redeploy cluster (Aravindan Vijayan via smohanty)


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

Branch: refs/heads/branch-2.2
Commit: 5e4f9573bc12143d9bd8594024ea4293f1ddbf8f
Parents: 9e1ebd7
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Sat Dec 12 08:34:57 2015 -0800
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Sat Dec 12 08:37:26 2015 -0800

----------------------------------------------------------------------
 .../AMBARI_METRICS/0.1.0/package/scripts/ams.py |  8 +++++++
 .../0.1.0/package/scripts/hbase.py              | 12 +++++++++++
 .../AMBARI_METRICS/test_metrics_collector.py    | 22 ++++++++++++++++++++
 3 files changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e4f9573/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
index 733fcc0..8fdf4ba 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
@@ -187,6 +187,10 @@ def ams(name=None):
               recursive=True
     )
 
+    Execute(('chown', '-R', params.ams_user, params.ams_collector_conf_dir),
+            sudo=True
+            )
+
     Directory(params.ams_checkpoint_dir,
               owner=params.ams_user,
               group=params.user_group,
@@ -194,6 +198,10 @@ def ams(name=None):
               recursive=True
     )
 
+    Execute(('chown', '-R', params.ams_user, params.ams_checkpoint_dir),
+            sudo=True
+            )
+
     XmlConfig("ams-site.xml",
               conf_dir=params.ams_collector_conf_dir,
               configurations=params.config['configurations']['ams-site'],

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e4f9573/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
index 92d2bc4..2157e00 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
@@ -97,12 +97,20 @@ def hbase(name=None # 'master' or 'regionserver' or 'client'
       recursive = True
   )
 
+  Execute(('chown', '-R', params.hbase_user, params.hbase_conf_dir),
+          sudo=True
+          )
+
   Directory (params.hbase_tmp_dir,
              owner = params.hbase_user,
              cd_access="a",
              recursive = True
   )
 
+  Execute(('chown', '-R', params.hbase_user, params.hbase_tmp_dir),
+          sudo=True
+          )
+
   Directory (os.path.join(params.local_dir, "jars"),
              owner = params.hbase_user,
              group = params.user_group,
@@ -230,6 +238,10 @@ def hbase(name=None # 'master' or 'regionserver' or 'client'
                 recursive = True
       )
 
+      Execute(('chown', '-R', params.hbase_user, local_root_dir),
+              sudo=True
+              )
+
       File(format("{params.hbase_pid_dir}/distributed_mode"), action="delete", owner=params.hbase_user)
 
   if params.hbase_log4j_props is not None:

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e4f9573/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 e884367..2b3a964 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
@@ -116,12 +116,20 @@ class TestMetricsCollector(RMFTestCase):
                               group = 'hadoop',
                               recursive = True
     )
+
+    self.assertResourceCalled('Execute', ('chown','-R', u'ams', '/etc/ambari-metrics-collector/conf'),
+                              sudo=True)
+
     self.assertResourceCalled('Directory', '/var/lib/ambari-metrics-collector/checkpoint',
                               owner = 'ams',
                               group = 'hadoop',
                               cd_access = 'a',
                               recursive = True
     )
+
+    self.assertResourceCalled('Execute', ('chown','-R', u'ams', '/var/lib/ambari-metrics-collector/checkpoint'),
+                              sudo=True)
+
     self.assertResourceCalled('XmlConfig', 'ams-site.xml',
                               owner = 'ams',
                               group = 'hadoop',
@@ -220,11 +228,19 @@ class TestMetricsCollector(RMFTestCase):
                               group = 'hadoop',
                               recursive = True
     )
+
+    self.assertResourceCalled('Execute', ('chown','-R', u'ams', '/etc/ams-hbase/conf'),
+                                sudo=True)
+
     self.assertResourceCalled('Directory', '/var/lib/ambari-metrics-collector/hbase-tmp',
                               owner = 'ams',
                               cd_access = 'a',
                               recursive = True
     )
+
+    self.assertResourceCalled('Execute', ('chown','-R', u'ams', '/var/lib/ambari-metrics-collector/hbase-tmp'),
+                            sudo=True)
+
     self.assertResourceCalled('Directory', '/var/lib/ambari-metrics-collector/hbase-tmp/local/jars',
                               owner = 'ams',
                               cd_access = 'a',
@@ -324,6 +340,12 @@ class TestMetricsCollector(RMFTestCase):
                                   cd_access="a",
                                   recursive = True
         )
+
+      if (not distributed):
+        self.assertResourceCalled('Execute', ('chown','-R','ams', '/var/lib/ambari-metrics-collector/hbase'),
+                                  sudo=True)
+
+
         self.assertResourceCalled('File', '/var/run/ambari-metrics-collector//distributed_mode',
                                   owner = 'ams',
                                   action = ['delete']


Mime
View raw message