ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-12385 - Oozie Service Fails After Downgrade Because Of Missing Falcon JAR In WAR (jonathanhurley)
Date Sat, 11 Jul 2015 05:42:05 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2f68125ea -> afdb7f9df


AMBARI-12385 - Oozie Service Fails After Downgrade Because Of Missing Falcon JAR In WAR (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: afdb7f9df508acfcc958dca15408b6356a4c0fc0
Parents: 2f68125
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Fri Jul 10 23:19:06 2015 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Sat Jul 11 01:40:37 2015 -0400

----------------------------------------------------------------------
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py    |   8 +-
 .../4.0.0.2.0/package/scripts/oozie_server.py   |  16 +-
 .../package/scripts/oozie_server_upgrade.py     |  53 +++++--
 .../4.0.0.2.0/package/scripts/params_linux.py   |  12 +-
 .../4.0.0.2.0/package/scripts/status_params.py  |   3 +-
 .../stacks/2.0.6/OOZIE/test_oozie_server.py     | 147 +++++++++++++------
 .../stacks/2.2/configs/oozie-downgrade.json     |   3 -
 .../stacks/2.2/configs/oozie-upgrade.json       |   3 -
 8 files changed, 172 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
index 7055255..35df33a 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
@@ -226,11 +226,11 @@ def oozie_server_specific():
   #falcon el extension
   if params.has_falcon_host:
     Execute(format('{sudo} cp {falcon_home}/oozie/ext/falcon-oozie-el-extension-*.jar {oozie_libext_dir}'),
-      not_if  = no_op_test,
-    )
+      not_if  = no_op_test)
+
     Execute(format('{sudo} chown {oozie_user}:{user_group} {oozie_libext_dir}/falcon-oozie-el-extension-*.jar'),
-      not_if  = no_op_test,
-    )
+      not_if  = no_op_test)
+
   if params.lzo_enabled and len(params.all_lzo_packages) > 0:
     Package(params.all_lzo_packages)
     Execute(format('{sudo} cp {hadoop_lib_home}/hadoop-lzo*.jar {oozie_lib_dir}'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
index c9bdd78..81d8c0c 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
@@ -53,9 +53,14 @@ class OozieServer(Script):
   def start(self, env, rolling_restart=False):
     import params
     env.set_params(params)
-    #TODO remove this when config command will be implemented
+
     self.configure(env)
 
+    # preparing the WAR file must run after configure since configure writes out
+    # oozie-env.sh which is needed to have the right environment directories setup!
+    if rolling_restart is True:
+      OozieUpgrade.prepare_warfile()
+
     oozie_service(action='start', rolling_restart=rolling_restart)
 
   def stop(self, env, rolling_restart=False):
@@ -141,9 +146,11 @@ class OozieServerDefault(OozieServer):
 
   def pre_rolling_restart(self, env):
     """
-    Performs the tasks surrounding the Oozie startup when a rolling upgrade
-    is in progress. This includes backing up the configuration, updating
-    the database, preparing the WAR, and installing the sharelib in HDFS.
+    Performs the tasks that should be done before an upgrade of oozie. This includes:
+      - backing up configurations
+      - running hdp-select and conf-select
+      - restoring configurations
+      - preparing the libext directory
     :param env:
     :return:
     """
@@ -164,7 +171,6 @@ class OozieServerDefault(OozieServer):
 
     OozieUpgrade.restore_configuration()
     OozieUpgrade.prepare_libext_directory()
-    OozieUpgrade.prepare_warfile()
 
 
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)

http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/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 6225eae..0dc0057 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
@@ -97,9 +97,11 @@ class OozieUpgrade(Script):
   @staticmethod
   def prepare_libext_directory():
     """
-    Creates /usr/hdp/current/oozie/libext-customer and recursively sets
-    777 permissions on it and its parents.
-    Also, downloads jdbc driver and provides other staff
+    Performs the following actions on libext:
+      - creates /usr/hdp/current/oozie/libext and recursively
+      - set 777 permissions on it and its parents.
+      - downloads JDBC driver JAR if needed
+      - copies Falcon JAR for the Oozie WAR if needed
     """
     import params
 
@@ -107,9 +109,8 @@ class OozieUpgrade(Script):
     target_version_needs_compression_libraries = compare_versions(
       format_hdp_stack_version(params.version), '2.2.1.0') >= 0
 
-    Directory(params.oozie_libext_customer_dir,
-      mode = 0777,
-    )
+    # ensure the directory exists
+    Directory(params.oozie_libext_dir, mode = 0777)
 
     # get all hadooplzo* JAR files
     # hdp-select set hadoop-client has not run yet, therefore we cannot use
@@ -132,30 +133,52 @@ class OozieUpgrade(Script):
       files_copied = False
       for file in files:
         if os.path.isfile(file):
-          Logger.info("Copying {0} to {1}".format(str(file), params.oozie_libext_customer_dir))
-          shutil.copy2(file, params.oozie_libext_customer_dir)
+          Logger.info("Copying {0} to {1}".format(str(file), params.oozie_libext_dir))
+          shutil.copy2(file, params.oozie_libext_dir)
           files_copied = True
 
       if not files_copied:
         raise Fail("There are no files at {0} matching {1}".format(
           hadoop_client_new_lib_dir, hadoop_lzo_pattern))
 
-    # copy ext ZIP to customer dir
+    # copy ext ZIP to libext dir
     oozie_ext_zip_file = '/usr/share/HDP-oozie/ext-2.2.zip'
     if not os.path.isfile(oozie_ext_zip_file):
       raise Fail("Unable to copy {0} because it does not exist".format(oozie_ext_zip_file))
 
-    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)
+    Logger.info("Copying {0} to {1}".format(oozie_ext_zip_file, params.oozie_libext_dir))
+    shutil.copy2(oozie_ext_zip_file, params.oozie_libext_dir)
 
     # Redownload jdbc driver to a new current location
     oozie.download_database_library_if_needed()
 
+    # get the upgrade version in the event that it's needed
+    upgrade_stack = hdp_select._get_upgrade_stack()
+    if upgrade_stack is None or len(upgrade_stack) < 2 or upgrade_stack[1] is None:
+      raise Fail("Unable to determine the stack that is being upgraded to or downgraded to.")
+
+    # something like 2.3.0.0-1234
+    stack_version = upgrade_stack[1]
+
+    # copy the Falcon JAR if needed; falcon has not upgraded yet, so we must
+    # use the versioned falcon directory
+    if params.has_falcon_host:
+      versioned_falcon_jar_directory = "/usr/hdp/{0}/falcon/oozie/ext/falcon-oozie-el-extension-*.jar".format(stack_version)
+      Logger.info("Copying {0} to {1}".format(versioned_falcon_jar_directory, params.oozie_libext_dir))
+
+      Execute(format('{sudo} cp {versioned_falcon_jar_directory} {oozie_libext_dir}'))
+      Execute(format('{sudo} chown {oozie_user}:{user_group} {oozie_libext_dir}/falcon-oozie-el-extension-*.jar'))
+
 
   @staticmethod
   def prepare_warfile():
     """
     Invokes the 'prepare-war' command in Oozie in order to create the WAR.
+    The prepare-war command uses the input WAR from ${OOZIE_HOME}/oozie.war and
+    outputs the prepared WAR to ${CATALINA_BASE}/webapps/oozie.war - because of this,
+    both of these environment variables must point to the upgraded oozie-server path and
+    not oozie-client since it was not yet updated.
+
     This method will also perform a kinit if necessary.
     :return:
     """
@@ -167,10 +190,14 @@ class OozieUpgrade(Script):
       command = format("{kinit_path_local} -kt {oozie_keytab} {oozie_principal_with_host}")
       Execute(command, user=params.oozie_user, logoutput=True)
 
+    # setup environment
+    environment = { "CATALINA_BASE" : "/usr/hdp/current/oozie-server/oozie-server",
+      "OOZIE_HOME" : "/usr/hdp/current/oozie-server" }
+
     # prepare the oozie WAR
-    command = format("{oozie_setup_sh} prepare-war {oozie_secure} -d {oozie_libext_customer_dir}")
+    command = format("{oozie_setup_sh} prepare-war {oozie_secure} -d {oozie_libext_dir}")
     return_code, oozie_output = shell.call(command, user=params.oozie_user,
-      logoutput=False, quiet=False)
+      logoutput=False, quiet=False, env=environment)
 
     # set it to "" in to prevent a possible iteration issue
     if oozie_output is None:

http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
index a3917f4..8eeedd7 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
@@ -56,6 +56,12 @@ hadoop_lib_home = hdp_select.get_hadoop_dir("lib")
 
 #hadoop params
 if Script.is_hdp_stack_greater_or_equal("2.2"):
+  # something like 2.3.0.0-1234
+  stack_version = None
+  upgrade_stack = hdp_select._get_upgrade_stack()
+  if upgrade_stack is not None and len(upgrade_stack) == 2 and upgrade_stack[1] is not None:
+    stack_version = upgrade_stack[1]
+
   # oozie-server or oozie-client, depending on role
   oozie_root = status_params.component_directory
 
@@ -65,13 +71,17 @@ if Script.is_hdp_stack_greater_or_equal("2.2"):
   oozie_webapps_dir = format("/usr/hdp/current/{oozie_root}/oozie-server/webapps")
   oozie_webapps_conf_dir = format("/usr/hdp/current/{oozie_root}/oozie-server/conf")
   oozie_libext_dir = format("/usr/hdp/current/{oozie_root}/libext")
-  oozie_libext_customer_dir = format("/usr/hdp/current/{oozie_root}/libext-customer")
   oozie_server_dir = format("/usr/hdp/current/{oozie_root}/oozie-server")
   oozie_shared_lib = format("/usr/hdp/current/{oozie_root}/share")
   oozie_home = format("/usr/hdp/current/{oozie_root}")
   oozie_bin_dir = format("/usr/hdp/current/{oozie_root}/bin")
   oozie_examples_regex = format("/usr/hdp/current/{oozie_root}/doc")
+
+  # set the falcon home for copying JARs; if in an upgrade, then use the version of falcon
that
+  # matches the version of oozie
   falcon_home = '/usr/hdp/current/falcon-client'
+  if stack_version is not None:
+    falcon_home = '/usr/hdp/{0}/falcon'.format(stack_version)
 
   conf_dir = format("/usr/hdp/current/{oozie_root}/conf")
   hive_conf_dir = format("{conf_dir}/action-conf/hive")

http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
index 8457e5d..d575bd1 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
@@ -29,7 +29,8 @@ from resource_management.libraries.script.script import Script
 SERVER_ROLE_DIRECTORY_MAP = {
   'OOZIE_SERVER' : 'oozie-server',
   'OOZIE_CLIENT' : 'oozie-client',
-  'OOZIE_SERVICE_CHECK' : 'oozie-client'
+  'OOZIE_SERVICE_CHECK' : 'oozie-client',
+  'ru_execute_tasks' : 'oozie-server'
 }
 
 component_directory = Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP, "OOZIE_CLIENT")

http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
index 39fd14b..d3242cb 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
@@ -973,7 +973,7 @@ class TestOozieServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/tmp/oozie-upgrade-backup',
         action = ['delete'],
     )
-    self.assertResourceCalled('Directory', '/usr/hdp/current/oozie-server/libext-customer',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/oozie-server/libext',
         mode = 0777,
     )
     self.assertNoMoreResources()
@@ -1016,8 +1016,7 @@ class TestOozieServer(RMFTestCase):
      hdp_stack_version = self.UPGRADE_STACK_VERSION,
      target = RMFTestCase.TARGET_COMMON_SERVICES,
      call_mocks = [(0, None), (0, prepare_war_stdout)],
-     mocks_dict = mocks_dict
-    )
+     mocks_dict = mocks_dict)
 
     self.assertTrue(isfile_mock.called)
     self.assertEqual(isfile_mock.call_count,3)
@@ -1031,31 +1030,33 @@ class TestOozieServer(RMFTestCase):
      '-zcvhf',
      '/tmp/oozie-upgrade-backup/oozie-conf-backup.tar',
      '/usr/hdp/current/oozie-server/conf/'),
-        sudo = True,
-    )
+        sudo = True)
+
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'oozie-server', '2.3.0.0-1234'),
-        sudo = True,
-    )
+        sudo = True)
+
     self.assertResourceCalled('Execute', ('tar',
      '-xvf',
      '/tmp/oozie-upgrade-backup/oozie-conf-backup.tar',
      '-C',
      '/usr/hdp/current/oozie-server/conf//'),
-        sudo = True,
-    )
+        sudo = True)
+
     self.assertResourceCalled('Directory', '/tmp/oozie-upgrade-backup',
-        action = ['delete'],
-    )
-    self.assertResourceCalled('Directory', '/usr/hdp/current/oozie-server/libext-customer',
-        mode = 0777,
-    )
+        action = ['delete'])
+
+    self.assertResourceCalled('Directory', '/usr/hdp/current/oozie-server/libext',
+        mode = 0777)
+
     self.assertNoMoreResources()
 
-    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['call'].call_count)
     self.assertEquals(1, mocks_dict['checked_call'].call_count)
+
     self.assertEquals(
       ('conf-select', 'set-conf-dir', '--package', 'oozie', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
        mocks_dict['checked_call'].call_args_list[0][0][0])
+
     self.assertEquals(
       ('conf-select', 'create-conf-dir', '--package', 'oozie', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
        mocks_dict['call'].call_args_list[0][0][0])
@@ -1105,39 +1106,12 @@ class TestOozieServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/tmp/oozie-upgrade-backup',
         action = ['delete'],
     )
-    self.assertResourceCalled('Directory', '/usr/hdp/current/oozie-server/libext-customer',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/oozie-server/libext',
         mode = 0777,
     )
     self.assertNoMoreResources()
 
 
-  @patch("tarfile.open")
-  @patch("os.path.isdir")
-  @patch("os.path.exists")
-  @patch("os.path.isfile")
-  @patch("os.remove")
-  @patch("os.chmod")
-  @patch("shutil.rmtree", new = MagicMock())
-  @patch("glob.iglob", new = MagicMock(return_value=["/usr/hdp/2.2.1.0-2187/hadoop/lib/hadoop-lzo-0.6.0.2.2.1.0-2187.jar"]))
-  @patch("shutil.copy2")
-  def test_upgrade_failed_prepare_war(self, shutil_copy_mock, chmod_mock, remove_mock,
-      isfile_mock, exists_mock, isdir_mock, tarfile_open_mock):
-
-    isdir_mock.return_value = True
-    exists_mock.return_value = False
-    isfile_mock.return_value = True
-
-    try:
-      self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py",
-       classname = "OozieServer", command = "pre_rolling_restart", config_file = "oozie-upgrade.json",
-       hdp_stack_version = self.UPGRADE_STACK_VERSION,
-       target = RMFTestCase.TARGET_COMMON_SERVICES )
-
-      self.fail("An invalid WAR preparation should have caused an error")
-    except Fail,f:
-      pass
-
-
   def test_upgrade_database_sharelib(self):
     """
     Tests that the upgrade script runs the proper commands before the
@@ -1264,3 +1238,90 @@ class TestOozieServer(RMFTestCase):
 
     self.assertResourceCalled('Execute', '/usr/hdp/2.3.0.0-1234/oozie/bin/oozie-setup.sh
sharelib create -fs hdfs://c6401.ambari.apache.org:8020',
       user='oozie', logoutput = True)
+
+  @patch("os.path.isdir")
+  @patch("os.path.exists")
+  @patch("os.path.isfile")
+  @patch("os.remove")
+  @patch("shutil.rmtree", new = MagicMock())
+  @patch("glob.iglob")
+  @patch("shutil.copy2", new = MagicMock())
+  def test_upgrade_23_ensure_falcon_copied(self, glob_mock, remove_mock,
+      isfile_mock, exists_mock, isdir_mock):
+
+    def exists_mock_side_effect(path):
+      if path == '/tmp/oozie-upgrade-backup/oozie-conf-backup.tar':
+        return True
+
+      return False
+
+    isdir_mock.return_value = True
+    exists_mock.side_effect = exists_mock_side_effect
+    isfile_mock.return_value = True
+    glob_mock.return_value = ["/usr/hdp/2.2.1.0-2187/hadoop/lib/hadoop-lzo-0.6.0.2.2.1.0-2187.jar"]
+
+    prepare_war_stdout = """INFO: Adding extension: libext/mysql-connector-java.jar
+    New Oozie WAR file with added 'JARs' at /var/lib/oozie/oozie-server/webapps/oozie.war"""
+
+    config_file = self.get_src_folder()+"/test/python/stacks/2.2/configs/oozie-upgrade.json"
+
+    with open(config_file, "r") as f:
+      json_content = json.load(f)
+
+    version = '2.3.0.0-1234'
+    json_content['commandParams']['version'] = version
+    json_content['clusterHostInfo']['falcon_server_hosts'] = ['c6401.ambari.apache.org']
+
+    mocks_dict = {}
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py",
+     classname = "OozieServer", command = "pre_rolling_restart", config_dict = json_content,
+     hdp_stack_version = self.UPGRADE_STACK_VERSION,
+     target = RMFTestCase.TARGET_COMMON_SERVICES,
+     call_mocks = [(0, None), (0, prepare_war_stdout)],
+     mocks_dict = mocks_dict)
+
+    self.assertTrue(isfile_mock.called)
+    self.assertEqual(isfile_mock.call_count,3)
+    isfile_mock.assert_called_with('/usr/share/HDP-oozie/ext-2.2.zip')
+
+    self.assertTrue(glob_mock.called)
+    self.assertEqual(glob_mock.call_count,1)
+    glob_mock.assert_called_with('/usr/hdp/2.3.0.0-1234/hadoop/lib/hadoop-lzo*.jar')
+
+    self.assertResourceCalled('Execute', ('tar',
+     '-zcvhf',
+     '/tmp/oozie-upgrade-backup/oozie-conf-backup.tar',
+     '/usr/hdp/current/oozie-server/conf/'),
+        sudo = True)
+
+    self.assertResourceCalled('Execute', ('hdp-select', 'set', 'oozie-server', '2.3.0.0-1234'),
+        sudo = True)
+
+    self.assertResourceCalled('Execute', ('tar',
+     '-xvf',
+     '/tmp/oozie-upgrade-backup/oozie-conf-backup.tar',
+     '-C',
+     '/usr/hdp/current/oozie-server/conf//'),
+        sudo = True)
+
+    self.assertResourceCalled('Directory', '/tmp/oozie-upgrade-backup',
+        action = ['delete'])
+
+    self.assertResourceCalled('Directory', '/usr/hdp/current/oozie-server/libext',
+        mode = 0777)
+
+    self.assertResourceCalled('Execute', 'ambari-sudo.sh cp /usr/hdp/2.3.0.0-1234/falcon/oozie/ext/falcon-oozie-el-extension-*.jar
/usr/hdp/current/oozie-server/libext')
+    self.assertResourceCalled('Execute', 'ambari-sudo.sh chown oozie:hadoop /usr/hdp/current/oozie-server/libext/falcon-oozie-el-extension-*.jar')
+
+    self.assertNoMoreResources()
+
+    self.assertEquals(1, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['checked_call'].call_count)
+
+    self.assertEquals(
+      ('conf-select', 'set-conf-dir', '--package', 'oozie', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+       mocks_dict['checked_call'].call_args_list[0][0][0])
+
+    self.assertEquals(
+      ('conf-select', 'create-conf-dir', '--package', 'oozie', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
index 5fca4e9..e9018d8 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
@@ -208,9 +208,6 @@
         "nm_hosts": [
             "c6403.ambari.apache.org"
         ], 
-        "falcon_server_hosts": [
-            "c6402.ambari.apache.org"
-        ], 
         "hive_metastore_host": [
             "c6402.ambari.apache.org"
         ], 

http://git-wip-us.apache.org/repos/asf/ambari/blob/afdb7f9d/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
index a2e8b1d..fc4df58 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
@@ -208,9 +208,6 @@
         "nm_hosts": [
             "c6403.ambari.apache.org"
         ], 
-        "falcon_server_hosts": [
-            "c6402.ambari.apache.org"
-        ], 
         "hive_metastore_host": [
             "c6402.ambari.apache.org"
         ], 


Mime
View raw message