ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [10/13] ambari git commit: AMBARI-21788. Ensure topology_mappings.data has 0644 permissions (aonishuk)
Date Wed, 23 Aug 2017 19:23:55 GMT
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/5605db32
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5605db32
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5605db32

Branch: refs/heads/branch-feature-AMBARI-21450
Commit: 5605db3293de2fb0993483da638bff69844f2106
Parents: 82af190
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Aug 23 11:45:29 2017 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Aug 23 11:45:29 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/5605db32/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/5605db32/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