You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2016/06/10 22:13:44 UTC

[1/2] ambari git commit: AMBARI-17174. Ambari 2.4 with HDF management Pack : Ranger Service Page : Domain Name(Only for AD) (srimanth)

Repository: ambari
Updated Branches:
  refs/heads/trunk e0dd3bf62 -> 60a7054dd


AMBARI-17174. Ambari 2.4 with HDF management Pack : Ranger Service Page : Domain Name(Only for AD) (srimanth)


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

Branch: refs/heads/trunk
Commit: 5f16380b60e3db39d20ad4ca924f041330a808b9
Parents: e0dd3bf
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Fri Jun 10 13:47:30 2016 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Fri Jun 10 14:53:09 2016 -0700

----------------------------------------------------------------------
 ambari-web/app/data/custom_stack_map.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5f16380b/ambari-web/app/data/custom_stack_map.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/custom_stack_map.js b/ambari-web/app/data/custom_stack_map.js
index 997e223..33b642c 100644
--- a/ambari-web/app/data/custom_stack_map.js
+++ b/ambari-web/app/data/custom_stack_map.js
@@ -48,5 +48,11 @@ module.exports = [
     "stackVersionNumber": "3.0",
     "sign": "<",
     "baseStackFolder": "HDP2"
+  },
+  {
+    "stackName": "HDF",
+    "stackVersionNumber": "2.0",
+    "sign": "=",
+    "baseStackFolder": "HDP2.3"
   }
-];
\ No newline at end of file
+];


[2/2] ambari git commit: AMBARI-17118. Incorrect formated external url in ranger configuration - causes Namenode startup failure (Mugdha Varadkar via srimanth)

Posted by sr...@apache.org.
AMBARI-17118. Incorrect formated external url in ranger configuration - causes Namenode startup failure (Mugdha Varadkar via srimanth)


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

Branch: refs/heads/trunk
Commit: 60a7054dd62764efefde81fc20f1790c443d4c58
Parents: 5f16380
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Fri Jun 10 15:01:11 2016 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Fri Jun 10 15:01:11 2016 -0700

----------------------------------------------------------------------
 .../libraries/functions/ranger_functions.py     |  3 ++-
 .../libraries/functions/ranger_functions_v2.py  |  6 +++--
 .../libraries/functions/setup_ranger_plugin.py  |  2 ++
 .../functions/setup_ranger_plugin_xml.py        |  2 ++
 .../0.96.0.2.0/package/scripts/params_linux.py  |  2 ++
 .../2.1.0.2.0/package/scripts/params_linux.py   |  2 ++
 .../0.12.0.2.0/package/scripts/params_linux.py  |  2 ++
 .../KAFKA/0.8.1/package/scripts/params.py       |  2 ++
 .../0.5.0.2.2/package/scripts/params_linux.py   |  2 ++
 .../RANGER/0.4.0/package/scripts/params.py      |  4 ++++
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py | 18 ++++++++++-----
 .../0.5.0.2.3/package/scripts/params.py         |  2 ++
 .../STORM/0.9.1/package/scripts/params_linux.py |  2 ++
 .../2.1.0.2.0/package/scripts/params_linux.py   |  3 +++
 .../stacks/HDP/2.3/services/stack_advisor.py    | 15 +++++++++++-
 .../ranger-hdfs-plugin-properties.xml           | 24 ++++++++++++++++++++
 .../stacks/HDP/2.5/services/stack_advisor.py    |  6 -----
 17 files changed, 81 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
index 48ae225..2ac1f32 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
@@ -41,7 +41,8 @@ class Rangeradmin:
   sInstance = None
 
   def __init__(self, url='http://localhost:6080', skip_if_rangeradmin_down = True):
-
+    if url.endswith('/'):
+      url = url.rstrip('/')
     self.baseUrl = url
     self.urlLogin = self.baseUrl + '/login.jsp'
     self.urlLoginPost = self.baseUrl + '/j_spring_security_check'

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py
index cfdd6f7..05beadb 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py
@@ -43,6 +43,8 @@ class RangeradminV2:
   sInstance = None
 
   def __init__(self, url='http://localhost:6080', skip_if_rangeradmin_down = True):
+    if url.endswith('/'):
+      url = url.rstrip('/')
     self.base_url = url
     self.url_login = self.base_url + '/login.jsp'
     self.url_login_post = self.base_url + '/j_spring_security_check'
@@ -135,7 +137,7 @@ class RangeradminV2:
       elif not self.skip_if_rangeradmin_down:
         Logger.error("Connection failed to Ranger Admin !")
     elif is_stack_supports_ranger_kerberos and is_security_enabled:
-      response = self.check_ranger_login_curl(component_user,component_user_keytab,component_user_principal,self.base_url,True)
+      response = self.check_ranger_login_curl(component_user,component_user_keytab,component_user_principal,self.url_login,True)
 
       if response and response[0] == 200:
         retryCount = 0
@@ -320,7 +322,7 @@ class RangeradminV2:
     error_msg = ''
     time_millis = 0
     try:
-      response,error_msg,time_millis = self.call_curl_request(component_user,component_user_keytab,component_user_principal,self.base_url,True)
+      response,error_msg,time_millis = self.call_curl_request(component_user,component_user_keytab,component_user_principal,base_url,True)
     except Fail,fail:
       raise Fail(fail.args)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
index 260f018..1923efe 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin.py
@@ -56,6 +56,8 @@ def setup_ranger_plugin(component_select_name, service_name, previous_jdbc_jar,
 
     File(driver_curl_target, mode=0644)
 
+  if policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
   stack_root = Script.get_stack_root()
   stack_version = get_stack_version(component_select_name)
   file_path = format('{stack_root}/{stack_version}/ranger-{service_name}-plugin/install.properties')

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
index e5faf4b..bd46051 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
@@ -65,6 +65,8 @@ def setup_ranger_plugin(component_select_name, service_name, previous_jdbc_jar,
 
     File(component_driver_curl_target, mode=0644)
 
+  if policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
   stack_version = get_stack_version(component_select_name)
   if stack_version_override is not None:
     stack_version = stack_version_override

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 05bad1c..11aa329 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -256,6 +256,8 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 # ranger hbase properties
 policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+  policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
 xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
 xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']
 xa_db_host = config['configurations']['admin-properties']['db_host']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index 9af87d4..f24bd83 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -396,6 +396,8 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 #ranger hdfs properties
 policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+  policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
 xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
 xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']
 xa_db_host = config['configurations']['admin-properties']['db_host']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index fea0635..b77457b 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -620,6 +620,8 @@ xml_configurations_supported = config['configurations']['ranger-env']['xml_confi
 
 #ranger hive properties
 policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+  policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
 xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
 xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']
 xa_db_host = config['configurations']['admin-properties']['db_host']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
index 09878ba..09ff522 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
@@ -174,6 +174,8 @@ if has_ranger_admin and is_supported_kafka_ranger:
   enable_ranger_kafka = config['configurations']['ranger-kafka-plugin-properties']['ranger-kafka-plugin-enabled']
   enable_ranger_kafka = not is_empty(enable_ranger_kafka) and enable_ranger_kafka.lower() == 'yes'
   policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+  if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
   xa_audit_db_flavor = config['configurations']['admin-properties']['DB_FLAVOR']
   xa_audit_db_flavor = xa_audit_db_flavor.lower() if xa_audit_db_flavor else None
   xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
index 6f138c0..7f94e67 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
@@ -256,6 +256,8 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 # ranger knox properties
 policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+  policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
 xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
 xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']
 xa_db_host = config['configurations']['admin-properties']['db_host']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 29ac561..ba66f8b 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -123,12 +123,16 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 db_flavor =  (config['configurations']['admin-properties']['DB_FLAVOR']).lower()
 usersync_exturl =  config['configurations']['admin-properties']['policymgr_external_url']
+if usersync_exturl.endswith('/'):
+  usersync_exturl = usersync_exturl.rstrip('/')
 ranger_host = config['clusterHostInfo']['ranger_admin_hosts'][0]
 ugsync_host = 'localhost'
 usersync_host_info = config['clusterHostInfo']['ranger_usersync_hosts']
 if not is_empty(usersync_host_info) and len(usersync_host_info) > 0:
   ugsync_host = config['clusterHostInfo']['ranger_usersync_hosts'][0]
 ranger_external_url = config['configurations']['admin-properties']['policymgr_external_url']
+if ranger_external_url.endswith('/'):
+  ranger_external_url = ranger_external_url.rstrip('/')
 ranger_db_name = config['configurations']['admin-properties']['db_name']
 ranger_auditdb_name = config['configurations']['admin-properties']['audit_db_name']
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
index cbe2a31..5847984 100755
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
@@ -467,16 +467,19 @@ def setup_kms_jce():
 def check_ranger_service():
   import params
 
-  ranger_adm_obj = Rangeradmin(url=params.policymgr_mgr_url)
+  policymgr_mgr_url = params.policymgr_mgr_url
+  if policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
+  ranger_adm_obj = Rangeradmin(url=policymgr_mgr_url)
   ambari_username_password_for_ranger = format("{ambari_ranger_admin}:{ambari_ranger_password}")
-  response_code = ranger_adm_obj.check_ranger_login_urllib2(params.policymgr_mgr_url)
+  response_code = ranger_adm_obj.check_ranger_login_urllib2(policymgr_mgr_url)
 
   if response_code is not None and response_code == 200:
     user_resp_code = ranger_adm_obj.create_ambari_admin_user(params.ambari_ranger_admin, params.ambari_ranger_password, params.admin_uname_password)
     if user_resp_code is not None and user_resp_code == 200:
-      get_repo_flag = get_repo(params.policymgr_mgr_url, params.repo_name, ambari_username_password_for_ranger)
+      get_repo_flag = get_repo(policymgr_mgr_url, params.repo_name, ambari_username_password_for_ranger)
       if not get_repo_flag:
-        return create_repo(params.policymgr_mgr_url, json.dumps(params.kms_ranger_plugin_repo), ambari_username_password_for_ranger)
+        return create_repo(policymgr_mgr_url, json.dumps(params.kms_ranger_plugin_repo), ambari_username_password_for_ranger)
       else:
         return True
     else:
@@ -547,8 +550,11 @@ def get_repo(url, name, usernamepassword):
 def check_ranger_service_support_kerberos():
   import params
 
-  ranger_adm_obj = RangeradminV2(url=params.policymgr_mgr_url)
-  response_code = ranger_adm_obj.check_ranger_login_curl(params.kms_user, params.rangerkms_keytab, params.rangerkms_principal, params.policymgr_mgr_url, True)
+  policymgr_mgr_url = params.policymgr_mgr_url
+  if policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
+  ranger_adm_obj = RangeradminV2(url=policymgr_mgr_url)
+  response_code = ranger_adm_obj.check_ranger_login_curl(params.kms_user, params.rangerkms_keytab, params.rangerkms_principal, policymgr_mgr_url, True)
 
   if response_code is not None and response_code[0] == 200:
     get_repo_name_response = ranger_adm_obj.get_repository_by_name_curl(params.kms_user, params.rangerkms_keytab, params.rangerkms_principal, params.repo_name, 'kms', 'true')

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/params.py
index 17f71fb..452be86 100755
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/params.py
@@ -80,6 +80,8 @@ credential_file = format('/etc/ranger/{repo_name}/cred.jceks')
 
 if has_ranger_admin:
   policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+  if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+    policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
   xa_audit_db_flavor = (config['configurations']['admin-properties']['DB_FLAVOR']).lower()
   xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
   xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
index eadbd4a..2899988 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
@@ -227,6 +227,8 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 #ranger storm properties
 policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+  policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
 xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
 xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']
 xa_db_host = config['configurations']['admin-properties']['db_host']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/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 29fb3c1..90f885a 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
@@ -392,6 +392,8 @@ if has_ranger_admin:
   if is_supported_yarn_ranger:
     enable_ranger_yarn = (config['configurations']['ranger-yarn-plugin-properties']['ranger-yarn-plugin-enabled'].lower() == 'yes')
     policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+    if 'admin-properties' in config['configurations'] and 'policymgr_external_url' in config['configurations']['admin-properties'] and policymgr_mgr_url.endswith('/'):
+      policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
     xa_audit_db_flavor = (config['configurations']['admin-properties']['DB_FLAVOR']).lower()
     xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
     xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']
@@ -423,6 +425,7 @@ if has_ranger_admin:
 
     if stack_supports_ranger_kerberos:
       ranger_plugin_config['ambari.service.check.user'] = policy_user
+      ranger_plugin_config['hadoop.security.authentication'] = 'kerberos' if security_enabled else 'simple'
 
     if stack_supports_ranger_kerberos and security_enabled:
       ranger_plugin_config['policy.download.auth.users'] = yarn_user

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index 36fe066..5a2a5ea 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -707,7 +707,8 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
                "hive-site": self.validateHiveConfigurations},
       "HBASE": {"hbase-site": self.validateHBASEConfigurations},
       "KAKFA": {"kafka-broker": self.validateKAFKAConfigurations},
-      "YARN": {"yarn-site": self.validateYARNConfigurations}
+      "YARN": {"yarn-site": self.validateYARNConfigurations},
+      "RANGER": {"admin-properties": self.validateRangerAdminConfigurations}
     }
     self.mergeValidators(parentValidators, childValidators)
     return parentValidators
@@ -908,3 +909,15 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 
   def isComponentUsingCardinalityForLayout(self, componentName):
     return componentName in ['NFS_GATEWAY', 'PHOENIX_QUERY_SERVER', 'SPARK_THRIFTSERVER']
+
+  def validateRangerAdminConfigurations(self, properties, recommendedDefaults, configurations, services, hosts):
+    ranger_site = properties
+    validationItems = []
+    servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+    if 'RANGER' in servicesList and 'policymgr_external_url' in ranger_site:
+      policymgr_mgr_url = ranger_site['policymgr_external_url']
+      if policymgr_mgr_url.endswith('/'):
+        validationItems.append({'config-name':'policymgr_external_url',
+                               'item':self.getWarnItem('Ranger External URL should not contain trailing slash "/"')})
+    return self.toConfigurationValidationProblems(validationItems,'admin-properties')
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/configuration/ranger-hdfs-plugin-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/configuration/ranger-hdfs-plugin-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/configuration/ranger-hdfs-plugin-properties.xml
new file mode 100644
index 0000000..cc6e800
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HDFS/configuration/ranger-hdfs-plugin-properties.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- /** * Licensed to the Apache Software Foundation (ASF) under one * or 
+	more contributor license agreements. See the NOTICE file * distributed with 
+	this work for additional information * regarding copyright ownership. The 
+	ASF licenses this file * to you under the Apache License, Version 2.0 (the 
+	* "License"); you may not use this file except in compliance * with the License. 
+	You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 
+	* * Unless required by applicable law or agreed to in writing, software * 
+	distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 
+	WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the 
+	License for the specific language governing permissions and * limitations 
+	under the License. */ -->
+<configuration supports_final="true">
+  <property>
+    <name>hadoop.rpc.protection</name>
+    <value>authentication</value>
+    <description>Used for repository creation on ranger admin</description>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <on-ambari-upgrade add="false" change="true" delete="true"/>
+    <on-stack-upgrade add="true" change="true" delete="false"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/60a7054d/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 3049517..2a77017 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -1225,15 +1225,11 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
 
     if 'ATLAS' in servicesList and has_ranger_tagsync:
       putTagsyncSiteProperty('ranger.tagsync.source.atlas', 'true')
-    else:
-      putTagsyncSiteProperty('ranger.tagsync.source.atlas', 'false')
 
     zookeeper_host_port = self.getZKHostPortString(services)
     if zookeeper_host_port and has_ranger_tagsync:
       zookeeper_host_list = zookeeper_host_port.split(',')
       putTagsyncAppProperty('atlas.kafka.zookeeper.connect', zookeeper_host_list[0])
-    else:
-      putTagsyncAppProperty('atlas.kafka.zookeeper.connect', 'localhost:2181')
 
     if 'KAFKA' in servicesList and has_ranger_tagsync:
       kafka_hosts = self.getHostNamesWithComponent("KAFKA", "KAFKA_BROKER", services)
@@ -1247,8 +1243,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
 
       final_kafka_host = ",".join(kafka_host_port)
       putTagsyncAppProperty('atlas.kafka.bootstrap.servers', final_kafka_host)
-    else:
-      putTagsyncAppProperty('atlas.kafka.bootstrap.servers', 'localhost:6667')
 
     if 'ranger-env' in services['configurations'] and 'is_solrCloud_enabled' in services['configurations']["ranger-env"]["properties"]:
       isSolrCloudEnabled = services['configurations']["ranger-env"]["properties"]["is_solrCloud_enabled"]  == "true"