AMBARI-15010 YARN metrics not written due to permissions on metrics properties file (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9419400d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9419400d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9419400d Branch: refs/heads/branch-dev-patch-upgrade Commit: 9419400da987d1a09c17ce511c1fdc307ad7ff65 Parents: a638ccb Author: Dmytro Sen <[email protected]> Authored: Thu Feb 11 23:29:27 2016 +0200 Committer: Dmytro Sen <[email protected]> Committed: Thu Feb 11 23:29:27 2016 +0200 ---------------------------------------------------------------------- .../0.8/hooks/before-START/scripts/shared_initialization.py | 1 + .../2.0.6/hooks/before-START/scripts/shared_initialization.py | 1 + .../python/stacks/2.0.6/hooks/before-START/test_before_start.py | 4 ++++ 3 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9419400d/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py index 2d2331a..265502f 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py @@ -85,6 +85,7 @@ def setup_hadoop(): File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"), owner=params.hdfs_user, + group=params.user_group, content=Template("hadoop-metrics2.properties.j2") ) http://git-wip-us.apache.org/repos/asf/ambari/blob/9419400d/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 85d8fec..21d3b43 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -98,6 +98,7 @@ def setup_hadoop(): File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"), owner=params.hdfs_user, + group=params.user_group, content=Template("hadoop-metrics2.properties.j2") ) http://git-wip-us.apache.org/repos/asf/ambari/blob/9419400d/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 da2b87f..90bd968 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 @@ -73,6 +73,7 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('File', '/etc/hadoop/conf/hadoop-metrics2.properties', content = Template('hadoop-metrics2.properties.j2'), + group='hadoop', owner = 'hdfs', ) self.assertResourceCalled('File', '/etc/hadoop/conf/task-log4j.properties', @@ -146,6 +147,7 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('File', '/etc/hadoop/conf/hadoop-metrics2.properties', content = Template('hadoop-metrics2.properties.j2'), + group='hadoop', owner = 'hdfs', ) self.assertResourceCalled('File', '/etc/hadoop/conf/task-log4j.properties', @@ -224,6 +226,7 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('File', '/etc/hadoop/conf/hadoop-metrics2.properties', content = Template('hadoop-metrics2.properties.j2'), + group='hadoop', owner = 'hdfs', ) self.assertResourceCalled('File', '/etc/hadoop/conf/task-log4j.properties', @@ -304,6 +307,7 @@ class TestHookBeforeStart(RMFTestCase): ) self.assertResourceCalled('File', '/etc/hadoop/conf/hadoop-metrics2.properties', content = Template('hadoop-metrics2.properties.j2'), + group='hadoop', owner = 'hdfs', ) self.assertResourceCalled('File', '/etc/hadoop/conf/task-log4j.properties',
