You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2013/06/10 20:20:13 UTC
svn commit: r1491553 -
/incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py
Author: mahadev
Date: Mon Jun 10 18:20:12 2013
New Revision: 1491553
URL: http://svn.apache.org/r1491553
Log:
AMBARI-2345. ambari-server setup flow is confusing when the user does not have the Oracle client installed. (mahadev)
Modified:
incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py
Modified: incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py?rev=1491553&r1=1491552&r2=1491553&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py (original)
+++ incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py Mon Jun 10 18:20:12 2013
@@ -912,7 +912,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
)
@@ -950,6 +950,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)
@@ -984,7 +999,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:
@@ -992,20 +1007,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:
@@ -1573,6 +1574,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)