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/04/23 19:14:14 UTC

ambari git commit: Revert "AMBARI-10686. Ranger Admin Install fails with an Attribute Error (aonishuk)"

Repository: ambari
Updated Branches:
  refs/heads/trunk 6fb7ee357 -> e8e7c827d


Revert "AMBARI-10686. Ranger Admin Install fails with an Attribute Error (aonishuk)"

This reverts commit 8779baea98e546fa120f8bc9c3eec367c7ba6423.


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

Branch: refs/heads/trunk
Commit: e8e7c827d33bea75bb3fdfd99dbcd5ca25f2d61a
Parents: 6fb7ee3
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Apr 23 20:13:31 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Apr 23 20:13:31 2015 +0300

----------------------------------------------------------------------
 .../RANGER/0.4.0/package/scripts/setup_ranger.py         | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e8e7c827/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
index cc85b90..391df2a 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger.py
@@ -83,21 +83,18 @@ def check_db_connnection():
   import params
 
   Logger.info('Checking DB connection')
-  env_dict = {}
+
   if params.db_flavor.lower() == 'mysql':
     cmd = format('{sql_command_invoker} -u {db_root_user} --password={db_root_password} -h {db_host}  -s -e "select version();"')
   elif params.db_flavor.lower() == 'oracle':
     cmd = format('{sql_command_invoker} {db_root_user}/{db_root_password}@{db_host} AS SYSDBA')
-    env_dict = {'ORACLE_HOME':params.oracle_home, 'LD_LIBRARY_PATH':params.oracle_home}
   elif params.db_flavor.lower() == 'postgres':
     cmd = 'true'
   elif params.db_flavor.lower() == 'sqlserver':
     cmd = 'true'
 
   try:
-    Execute(cmd,
-      environment=env_dict,
-      logoutput=True)
+    Execute(cmd)
   except Fail as ex:
-    Logger.error(str(ex))
-    raise Fail('Ranger Database connection check failed')
+    Logger.info(ex)
+    raise Fail('Ranger Admin installation Failed! Ranger requires DB client installed on Ranger Host, DB administrative privileges configured for connectivity from the Ranger Admin host to the configured DB host/instance and the DB server up and running on the DB host.')