ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject ambari git commit: AMBARI-10575. RU: Oozie upgrade fails when using oracle DB (dlysnichenko)
Date Mon, 20 Apr 2015 17:26:01 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 665eb1784 -> d0f32d236


AMBARI-10575. RU: Oozie upgrade fails when using oracle DB (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0f32d23
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0f32d23
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0f32d23

Branch: refs/heads/branch-2.0.maint
Commit: d0f32d236029a60c9ff460a7c2d90b54c8e16ee7
Parents: 665eb17
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Fri Apr 17 22:18:00 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Mon Apr 20 20:23:27 2015 +0300

----------------------------------------------------------------------
 .../package/scripts/oozie_server_upgrade.py     | 22 +++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0f32d23/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
index a14934b..c4a62ea 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
@@ -30,6 +30,8 @@ from resource_management.libraries.functions import Direction
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions import compare_versions
 from resource_management.libraries.functions import format_hdp_stack_version
+from resource_management.core.resources import File
+from resource_management.core.source import DownloadSource
 
 BACKUP_TEMP_DIR = "oozie-upgrade-backup"
 BACKUP_CONF_ARCHIVE = "oozie-conf-backup.tar"
@@ -100,7 +102,7 @@ def prepare_libext_directory():
   """
   Creates /usr/hdp/current/oozie/libext-customer and recursively sets
   777 permissions on it and its parents.
-  :return:
+  Also, downloads jdbc driver and provides other staff
   """
   import params
 
@@ -151,6 +153,24 @@ def prepare_libext_directory():
   Logger.info("Copying {0} to {1}".format(oozie_ext_zip_file, params.oozie_libext_customer_dir))
   shutil.copy2(oozie_ext_zip_file, params.oozie_libext_customer_dir)
 
+  # Redownload jdbc driver to a new current location
+  if params.jdbc_driver_name=="com.mysql.jdbc.Driver" or \
+                  params.jdbc_driver_name == "com.microsoft.sqlserver.jdbc.SQLServerDriver"
or \
+                  params.jdbc_driver_name=="oracle.jdbc.driver.OracleDriver":
+    File(params.downloaded_custom_connector,
+         content = DownloadSource(params.driver_curl_source),
+    )
+
+    Execute(('cp', '--remove-destination', params.downloaded_custom_connector, params.target),
+            #creates=params.target, TODO: uncomment after ranger_hive_plugin will not provide
jdbc
+            path=["/bin", "/usr/bin/"],
+            sudo = True)
+
+    File ( params.target,
+           owner = params.oozie_user,
+           group = params.user_group
+    )
+
 
 def upgrade_oozie():
   """


Mime
View raw message