You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/03/11 20:51:10 UTC

ambari git commit: AMBARI-10034 Wrong mysql-connector jar is not replaced during ambari-server setup (dsen)

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 <ds...@apache.org>
Authored: Wed Mar 11 20:38:16 2015 +0200
Committer: Dmytro Sen <ds...@apache.org>
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."