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 2015/06/14 12:06:23 UTC

[2/2] ambari git commit: AMBARI-11912. Ambari removing ranger group from ranger user after installation (aonishuk)

AMBARI-11912. Ambari removing ranger group from ranger user after installation (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 172d251d634c4484059110f11ea40340ec36e2d5
Parents: 9a332b8
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Sun Jun 14 13:06:15 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Sun Jun 14 13:06:15 2015 +0300

----------------------------------------------------------------------
 .../stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/172d251d/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
index 1c7b2b7..5b5829d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
@@ -151,6 +151,7 @@ gmond_user = config['configurations']['ganglia-env']["gmond_user"]
 tez_user = config['configurations']['tez-env']["tez_user"]
 oozie_user = config['configurations']['oozie-env']["oozie_user"]
 falcon_user = config['configurations']['falcon-env']["falcon_user"]
+ranger_user = config['configurations']['ranger-env']["ranger_user"]
 
 user_group = config['configurations']['cluster-env']['user_group']
 
@@ -159,6 +160,7 @@ namenode_host = default("/clusterHostInfo/namenode_host", [])
 hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
 oozie_servers = default("/clusterHostInfo/oozie_server", [])
 falcon_server_hosts = default("/clusterHostInfo/falcon_server_hosts", [])
+ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
 
 has_namenode = not len(namenode_host) == 0
 has_ganglia_server = not len(ganglia_server_hosts) == 0
@@ -166,10 +168,12 @@ has_tez = 'tez-site' in config['configurations']
 has_hbase_masters = not len(hbase_master_hosts) == 0
 has_oozie_server = not len(oozie_servers) == 0
 has_falcon_server_hosts = not len(falcon_server_hosts) == 0
+has_ranger_admin = not len(ranger_admin_hosts) == 0
 
 hbase_tmp_dir = "/tmp/hbase-hbase"
 
-proxyuser_group = default("/configurations/hadoop-env/proxyuser_group","users")
+proxyuser_group = config['configurations']['hadoop-env']['proxyuser_group']
+ranger_group = config['configurations']['ranger-env']['ranger_group']
 dfs_cluster_administrators_group = config['configurations']['hdfs-site']["dfs.cluster.administrators"]
 
 ignore_groupsusers_create = default("/configurations/cluster-env/ignore_groupsusers_create", False)
@@ -192,6 +196,8 @@ if has_oozie_server:
   user_to_groups_dict[oozie_user] = [proxyuser_group]
 if has_falcon_server_hosts:
   user_to_groups_dict[falcon_user] = [proxyuser_group]
+if has_ranger_admin:
+  user_to_groups_dict[ranger_user] = [ranger_group]
 
 user_to_gid_dict = collections.defaultdict(lambda:user_group)