ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gau...@apache.org
Subject [1/2] ambari git commit: AMBARI-16894: Default Ranger repos for some services are not getting created(gautam)
Date Mon, 30 May 2016 05:30:52 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 d6bac0d51 -> c543921d4
  refs/heads/trunk 8d208b67f -> 008e4d184


AMBARI-16894: Default Ranger repos for some services are not getting created(gautam)


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

Branch: refs/heads/trunk
Commit: 008e4d1844f08373b5bf8ad58bf80d6613149b28
Parents: 8d208b6
Author: Gautam Borad <gautam@apache.org>
Authored: Thu May 26 18:27:45 2016 +0530
Committer: Gautam Borad <gautam@apache.org>
Committed: Mon May 30 11:00:15 2016 +0530

----------------------------------------------------------------------
 .../libraries/functions/ranger_functions_v2.py                  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/008e4d18/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 efb0819..cfdd6f7 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
@@ -100,7 +100,7 @@ class RangeradminV2:
                                ambari_ranger_admin, ambari_ranger_password,
                                admin_uname, admin_password, policy_user, is_security_enabled
= False, is_stack_supports_ranger_kerberos = False,
                                component_user = None, component_user_principal = None, component_user_keytab
= None):
-    if not is_stack_supports_ranger_kerberos :
+    if not is_stack_supports_ranger_kerberos or not is_security_enabled:
       response_code = self.check_ranger_login_urllib2(self.base_url)
       repo_data = json.dumps(repo_properties)
       ambari_ranger_password = unicode(ambari_ranger_password)
@@ -378,8 +378,9 @@ class RangeradminV2:
         if 'name' in response_json and response_json['name'].lower() == name.lower():
           Logger.info('Repository created Successfully')
           return response_json
-        elif 'exists'.lower() in response_json.lower():
+        elif 'exists' in response.lower():
           Logger.info('Repository {name} already exists'.format(name=name))
+          return response_json
         else:
           Logger.info('Repository creation failed')
           return None


Mime
View raw message