Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 794F010246 for ; Mon, 10 Jun 2013 18:24:42 +0000 (UTC) Received: (qmail 29837 invoked by uid 500); 10 Jun 2013 18:24:42 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 29819 invoked by uid 500); 10 Jun 2013 18:24:42 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 29794 invoked by uid 99); 10 Jun 2013 18:24:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 18:24:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 18:24:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7E3A323888D2; Mon, 10 Jun 2013 18:24:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: ambari-commits@incubator.apache.org From: mahadev@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130610182419.7E3A323888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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)