ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject [45/50] [abbrv] ambari git commit: AMBARI-21788. Ensure topology_mappings.data has 0644 permissions (aonishuk)
Date Mon, 09 Oct 2017 18:34:59 GMT
AMBARI-21788. Ensure topology_mappings.data has 0644 permissions (aonishuk)

Change-Id: I2c85d8f4ca5a88e3f0bbf46d357bdd0dcd7adc10


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

Branch: refs/heads/2.5-maint
Commit: f2f9afbc75ff5f39534576b65843d806e6d6cdae
Parents: 2bf87b8
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Aug 25 15:08:53 2017 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Aug 25 15:08:53 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/f2f9afbc/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/f2f9afbc/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