ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-13273 Ambari stack changes to allow Ranger Usersync to be installed on separate host. (2nd patch) (gautam via jaimin)
Date Fri, 13 Nov 2015 17:24:06 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b6a3476c7 -> 6929008bd


AMBARI-13273 Ambari stack changes to allow Ranger Usersync to be installed on separate host.
(2nd patch) (gautam via jaimin)


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

Branch: refs/heads/trunk
Commit: 6929008bdf34c98ecaa65ab8d8b6dcb90a149196
Parents: b6a3476
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri Nov 13 09:21:20 2015 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri Nov 13 09:23:52 2015 -0800

----------------------------------------------------------------------
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py         | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6929008b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index a4fe047..8de0d80 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -284,6 +284,7 @@ def setup_usersync(upgrade_type=None):
   import params
 
   usersync_home = params.usersync_home
+  ranger_home = params.ranger_home
   ranger_ugsync_conf = params.ranger_ugsync_conf
 
   if not is_empty(params.ranger_usersync_ldap_ldapbindpassword) and params.ug_sync_source
== 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder':
@@ -291,6 +292,7 @@ def setup_usersync(upgrade_type=None):
 
   if upgrade_type is not None:
     usersync_home = format("/usr/hdp/{version}/ranger-usersync")
+    ranger_home = format("/usr/hdp/{version}/ranger-admin")
     ranger_ugsync_conf = format("/usr/hdp/{version}/ranger-usersync/conf")
 
   Directory(params.ranger_pid_dir,
@@ -334,8 +336,12 @@ def setup_usersync(upgrade_type=None):
   if os.path.isfile(params.cred_validator_file):
     File(params.cred_validator_file, group=params.unix_group, mode=04555)
 
+  cred_file = format('{ranger_home}/ranger_credential_helper.py')
+  if os.path.isfile(format('{usersync_home}/ranger_credential_helper.py')):
+    cred_file = format('{usersync_home}/ranger_credential_helper.py')
+
   cred_lib = os.path.join(usersync_home,"lib","*")
-  cred_setup_prefix = (format('{usersync_home}/ranger_credential_helper.py'), '-l', cred_lib)
+  cred_setup_prefix = (cred_file, '-l', cred_lib)
 
   cred_setup = cred_setup_prefix + ('-f', params.ugsync_jceks_path, '-k', 'usersync.ssl.key.password',
'-v', PasswordString(params.ranger_usersync_keystore_password), '-c', '1')
   Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)


Mime
View raw message