incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1491555 - /incubator/ambari/branches/branch-1.2.4/ambari-server/src/main/python/ambari-server.py
Date Mon, 10 Jun 2013 18:24:19 GMT
Author: mahadev
Date: Mon Jun 10 18:24:19 2013
New Revision: 1491555

URL: http://svn.apache.org/r1491555
Log:
AMBARI-2345. ambari-server setup flow is confusing when the user does not have the Oracle
client installed. (mahadev)

Modified:
    incubator/ambari/branches/branch-1.2.4/ambari-server/src/main/python/ambari-server.py

Modified: incubator/ambari/branches/branch-1.2.4/ambari-server/src/main/python/ambari-server.py
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.4/ambari-server/src/main/python/ambari-server.py?rev=1491555&r1=1491554&r2=1491555&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.4/ambari-server/src/main/python/ambari-server.py
(original)
+++ incubator/ambari/branches/branch-1.2.4/ambari-server/src/main/python/ambari-server.py
Mon Jun 10 18:24:19 2013
@@ -810,7 +810,7 @@ def check_jdbc_drivers(args):
   result = find_jdbc_driver(args)
   if result == -1:
     msg = 'WARNING: Before starting Ambari Server, ' \
-          'the {0} JDBC driver JAR file must be placed to {1}. Press enter to continue.'.format(
+          'the {0} JDBC driver JAR file must be copied to {1}. Press enter to continue.'.format(
       DATABASE_FULL_NAMES[args.database],
       JAVA_SHARE_PATH
     )
@@ -848,6 +848,21 @@ def setup(args):
   print 'Configuring database...'
   prompt_db_properties(args)
 
+  print 'Checking JDK...'
+  retcode = download_jdk(args)
+  if not retcode == 0:
+    print_error_msg ('Downloading or installing JDK failed. Exiting.')
+    sys.exit(retcode)
+
+  print 'Completing setup...'
+  retcode = configure_os_settings()
+  if not retcode == 0:
+    print_error_msg ('Configure of OS settings in '
+                   'ambari.properties failed. Exiting.')
+    sys.exit(retcode)
+  
+  #DB setup should be done last after doing any setup.
+  
   if is_local_database(args):
     print 'Default properties detected. Using built-in database.'
     store_local_properties(args)
@@ -882,7 +897,7 @@ def setup(args):
     print 'Configuring remote database connection properties...'
     retcode = setup_remote_db(args)
     if retcode == -1:
-      # means the cli was not found
+      #means the cli was not found
       sys.exit(retcode)
       
     if not retcode == 0:
@@ -890,20 +905,6 @@ def setup(args):
       sys.exit(retcode)
 
 
-
-  print 'Checking JDK...'
-  retcode = download_jdk(args)
-  if not retcode == 0:
-    print_error_msg ('Downloading or installing JDK failed. Exiting.')
-    sys.exit(retcode)
-
-  print 'Completing setup...'
-  retcode = configure_os_settings()
-  if not retcode == 0:
-    print_error_msg ('Configure of OS settings in '
-                   'ambari.properties failed. Exiting.')
-    sys.exit(retcode)
-
   if args.warnings:
     print "Ambari Server 'setup' finished with warnings:"
     for warning in args.warnings:
@@ -1464,6 +1465,8 @@ def store_local_properties(args):
   except Exception, e:
     print 'Could not read ambari config file "%s": %s' % (conf_file, e)
     return -1
+  properties.removeOldProp(JDBC_SCHEMA_PROPERTY)
+  properties.removeOldProp(JDBC_HOSTNAME_PROPERTY)
   properties.removeOldProp(JDBC_DATABASE_PROPERTY)
   properties.removeOldProp(JDBC_RCA_DRIVER_PROPERTY)
   properties.removeOldProp(JDBC_RCA_URL_PROPERTY)



Mime
View raw message