incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject git commit: AMBARI-3402. ambari-server setup silently fails when it cannot connect to the remote oracle host. (mpapirkovskyy)
Date Tue, 01 Oct 2013 17:22:08 GMT
Updated Branches:
  refs/heads/trunk 256932652 -> 8053bbdc0


AMBARI-3402. ambari-server setup silently fails when it cannot connect to the remote oracle
host. (mpapirkovskyy)


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

Branch: refs/heads/trunk
Commit: 8053bbdc0c7e1e9dec21156e26468d99b9046b44
Parents: 2569326
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Tue Oct 1 20:17:26 2013 +0300
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Tue Oct 1 20:21:40 2013 +0300

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari-server.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8053bbdc/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index 68e122b..94cf2c5 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -331,7 +331,7 @@ REGEX_ANYTHING = ".*"
 
 
 POSTGRES_EXEC_ARGS = "-h {0} -p {1} -d {2} -U {3} -f {4} -v username='\"{3}\"'"
-ORACLE_EXEC_ARGS = "-S '{0}/{1}@(description=(address=(protocol=TCP)(host={2})(port={3}))(connect_data=({6}={4})))'
@{5} {0}"
+ORACLE_EXEC_ARGS = "-S -L '{0}/{1}@(description=(address=(protocol=TCP)(host={2})(port={3}))(connect_data=({6}={4})))'
@{5} {0}"
 MYSQL_EXEC_ARGS = "--host={0} --port={1} --user={2} --password={3} {4} " \
                  "-e\"set @schema=\'{4}\'; set @username=\'{2}\'; source {5};\""
 
@@ -1283,7 +1283,8 @@ def remote_stack_upgrade(args, scriptPath, stackId):
   #TODO add support of other databases with scripts
   if args.database == "oracle":
     sid_or_sname = "sid"
-    if args.sid_or_sname == "sname" or (args.jdbc_url and re.match(ORACLE_SNAME_PATTERN,
args.jdbc_url)):
+    if (hasattr(args, 'sid_or_sname') and args.sid_or_sname == "sname") or \
+        (hasattr(args, 'jdbc_url') and args.jdbc_url and re.match(ORACLE_SNAME_PATTERN, args.jdbc_url)):
       print_info_msg("using SERVICE_NAME instead of SID for Oracle")
       sid_or_sname = "service_name"
 
@@ -1326,7 +1327,8 @@ def execute_remote_script(args, scriptPath):
     return retcode, out, err
   elif args.database == "oracle":
     sid_or_sname = "sid"
-    if args.sid_or_sname == "sname" or (args.jdbc_url and re.match(ORACLE_SNAME_PATTERN,
args.jdbc_url)):
+    if (hasattr(args, 'sid_or_sname') and args.sid_or_sname == "sname") or \
+        (hasattr(args, 'jdbc_url') and args.jdbc_url and re.match(ORACLE_SNAME_PATTERN, args.jdbc_url)):
       print_info_msg("using SERVICE_NAME instead of SID for Oracle")
       sid_or_sname = "service_name"
 


Mime
View raw message