Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B468176CE for ; Wed, 11 Mar 2015 19:51:10 +0000 (UTC) Received: (qmail 34406 invoked by uid 500); 11 Mar 2015 19:51:10 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 34374 invoked by uid 500); 11 Mar 2015 19:51:10 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 34365 invoked by uid 99); 11 Mar 2015 19:51:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2015 19:51:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5D460E108E; Wed, 11 Mar 2015 19:51:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dsen@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-10034 Wrong mysql-connector jar is not replaced during ambari-server setup (dsen) Date: Wed, 11 Mar 2015 19:51:10 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 14ef5195c -> 7d6ab56a6 AMBARI-10034 Wrong mysql-connector jar is not replaced during ambari-server setup (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d6ab56a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d6ab56a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d6ab56a Branch: refs/heads/trunk Commit: 7d6ab56a671aef6d5bea2192aebfc43bf8b2e653 Parents: 14ef519 Author: Dmytro Sen Authored: Wed Mar 11 20:38:16 2015 +0200 Committer: Dmytro Sen Committed: Wed Mar 11 21:50:00 2015 +0200 ---------------------------------------------------------------------- .../src/main/python/ambari_server/serverSetup.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7d6ab56a/ambari-server/src/main/python/ambari_server/serverSetup.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py b/ambari-server/src/main/python/ambari_server/serverSetup.py index 1c6dbbc..42b7d24 100644 --- a/ambari-server/src/main/python/ambari_server/serverSetup.py +++ b/ambari-server/src/main/python/ambari_server/serverSetup.py @@ -797,13 +797,16 @@ def _cache_jdbc_driver(args): if os.path.lexists(jdbc_symlink): os.remove(jdbc_symlink) - if not os.path.isfile(os.path.join(resources_dir, jdbc_name)): - try: - shutil.copy(args.jdbc_driver, resources_dir) - except Exception, e: - err = "Can not copy file {0} to {1} due to: {2} . Please check file " \ - "permissions and free disk space.".format(args.jdbc_driver, resources_dir, str(e)) - raise FatalException(1, err) + if os.path.isfile(os.path.join(resources_dir, jdbc_name)): + os.remove(os.path.join(resources_dir, jdbc_name)) + + try: + shutil.copy(args.jdbc_driver, resources_dir) + print "Copying {0} to {1}".format(args.jdbc_driver, resources_dir) + except Exception, e: + err = "Can not copy file {0} to {1} due to: {2} . Please check file " \ + "permissions and free disk space.".format(args.jdbc_driver, resources_dir, str(e)) + raise FatalException(1, err) os.symlink(os.path.join(resources_dir, jdbc_name), jdbc_symlink) print "JDBC driver was successfully initialized."