You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/04/14 17:07:58 UTC

[2/2] ambari git commit: AMBARI-15885. Owner of /tmp hdfs directory is yarn user on secure blueprint install (aonishuk)

AMBARI-15885. Owner of /tmp hdfs directory is yarn user on secure blueprint install (aonishuk)


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

Branch: refs/heads/branch-2.2
Commit: 6c64d538ac7dd082139b9c93b15b7b176d4c54bc
Parents: e8ed70f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Apr 14 18:07:38 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Apr 14 18:07:38 2016 +0300

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py            | 1 +
 .../common-services/YARN/2.1.0.2.0/package/scripts/yarn.py    | 7 +++----
 .../src/test/python/stacks/2.0.6/YARN/test_historyserver.py   | 6 ++----
 3 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6c64d538/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index 91fdb83..8938ca4 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -121,6 +121,7 @@ ulimit_cmd = "ulimit -c unlimited;"
 mapred_user = status_params.mapred_user
 yarn_user = status_params.yarn_user
 hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
+hdfs_tmp_dir = config['configurations']['hadoop-env']['hdfs_tmp_dir']
 
 smokeuser = config['configurations']['cluster-env']['smokeuser']
 smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']

http://git-wip-us.apache.org/repos/asf/ambari/blob/6c64d538/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
index bb2f567..1fb49f4 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
@@ -73,12 +73,11 @@ def yarn(name = None):
 
     # create the /tmp folder with proper permissions if it doesn't exist yet
     if params.entity_file_history_directory.startswith('/tmp'):
-        params.HdfsResource('/tmp',
+        params.HdfsResource(params.hdfs_tmp_dir,
                             action="create_on_execute",
                             type="directory",
-                            owner=params.yarn_user,
-                            group=params.user_group,
-                            mode=0777
+                            owner=params.hdfs_user,
+                            mode=0777,
         )
 
     params.HdfsResource(params.entity_file_history_directory,

http://git-wip-us.apache.org/repos/asf/ambari/blob/6c64d538/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
index 6910113..4bfc16a 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
@@ -224,8 +224,7 @@ class TestHistoryServer(RMFTestCase):
         principal_name = UnknownConfigurationMock(),
         user = 'hdfs',
         dfs_type = '',
-        owner = 'yarn',
-        group = 'hadoop',
+        owner = 'hdfs',
         hadoop_conf_dir = '/etc/hadoop/conf',
         type = 'directory',
         action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
@@ -498,8 +497,7 @@ class TestHistoryServer(RMFTestCase):
         principal_name = 'hdfs',
         user = 'hdfs',
         dfs_type = '',
-        owner = 'yarn',
-        group = 'hadoop',
+        owner = 'hdfs',
         hadoop_conf_dir = '/etc/hadoop/conf',
         type = 'directory',
         action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',