ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] ambari git commit: AMBARI-21788. Ensure topology_mappings.data has 0644 permissions (aonishuk)
Date Wed, 30 Aug 2017 14:51:27 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 b3f176d52 -> 5b8d774de


AMBARI-21788. Ensure topology_mappings.data has 0644 permissions (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: 41070e2f8bda5ab3492613ffc0358e3ab4f5cdd0
Parents: b3f176d
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Aug 30 17:50:04 2017 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Aug 30 17:50:04 2017 +0300

----------------------------------------------------------------------
 .../HDP/2.0.6/hooks/before-START/scripts/rack_awareness.py     | 1 +
 .../stacks/2.0.6/hooks/before-START/test_before_start.py       | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/41070e2f/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/rack_awareness.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/rack_awareness.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/rack_awareness.py
index 548f051..48158bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/rack_awareness.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/rack_awareness.py
@@ -30,6 +30,7 @@ def create_topology_mapping():
        content=Template("topology_mappings.data.j2"),
        owner=params.hdfs_user,
        group=params.user_group,
+       mode=0644,
        only_if=format("test -d {net_topology_script_dir}"))
 
 def create_topology_script():

http://git-wip-us.apache.org/repos/asf/ambari/blob/41070e2f/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
index 4f62ace..510dc41 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
@@ -92,6 +92,7 @@ class TestHookBeforeStart(RMFTestCase):
     self.assertResourceCalled('File', '/etc/hadoop/conf/topology_mappings.data',
                               owner = 'hdfs',
                               content = Template('topology_mappings.data.j2'),
+                              mode = 0644,
                               group = 'hadoop',
                               only_if = 'test -d /etc/hadoop/conf',
                               )
@@ -167,6 +168,7 @@ class TestHookBeforeStart(RMFTestCase):
                               owner = 'hdfs',
                               content = Template('topology_mappings.data.j2'),
                               group = 'hadoop',
+                              mode = 0644,
                               only_if = 'test -d /etc/hadoop/conf',
                               )
     self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py',
@@ -246,6 +248,7 @@ class TestHookBeforeStart(RMFTestCase):
                               owner = 'hdfs',
                               content = Template('topology_mappings.data.j2'),
                               group = 'hadoop',
+                              mode = 0644,
                               only_if = 'test -d /etc/hadoop/conf',
                               )
     self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py',
@@ -256,7 +259,7 @@ class TestHookBeforeStart(RMFTestCase):
     self.assertNoMoreResources()
 
   def test_hook_refresh_topology_custom_directories(self):
-    config_file = "stacks/2.0.6/configs/default.json"
+    config_file = "{0}/test/python/stacks/2.0.6/configs/default.json".format(self.get_src_folder())
     with open(config_file, "r") as f:
       default_json = json.load(f)
 
@@ -327,6 +330,7 @@ class TestHookBeforeStart(RMFTestCase):
                               owner = 'hdfs',
                               content = Template('topology_mappings.data.j2'),
                               group = 'hadoop',
+                              mode = 0644,
                               only_if = 'test -d /etc/hadoop/conf',
                               )
     self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py',


Mime
View raw message