You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2018/01/15 14:45:04 UTC

[ambari] branch branch-3.0-perf updated (1066ad3 -> b6b29fd)

This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a change to branch branch-3.0-perf
in repository https://gitbox.apache.org/repos/asf/ambari.git.


    from 1066ad3  AMBARI-22763. Temporarily ignore ActiveWidgetLayoutResourceProviderTest due to StackOverflowError
     new 7162078  AMBARI-22784. Fix stack unit tests on branch-3.0-perf (aonishuk)
     new 04a71b9  AMBARI-22784. Fix stack unit tests on branch-3.0-perf (aonishuk)
     new b6b29fd  AMBARI-22786. Fix server unit tests on branch-3.0-perf (aonishuk)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../libraries/functions/conf_select.py             |   2 +-
 .../libraries/functions/lzo_utils.py               |   6 +-
 .../libraries/functions/stack_features.py          |   2 +-
 .../resource_management/libraries/script/script.py |   2 +-
 .../LOGSEARCH/0.5.0/package/scripts/logfeeder.py   |   7 +-
 .../LOGSEARCH/0.5.0/package/scripts/logsearch.py   |   8 +-
 .../LOGSEARCH/0.5.0/package/scripts/params.py      |  18 ++-
 .../0.5.0/package/scripts/setup_logfeeder.py       |   2 +-
 .../0.5.0/package/scripts/setup_logsearch.py       |   2 +-
 .../custom_actions/scripts/update_repo.py          |  11 +-
 .../src/test/python/TestResourceFilesKeeper.py     |   2 +-
 ambari-server/src/test/python/TestStackFeature.py  |  26 ++--
 ambari-server/src/test/python/TestStackSelect.py   |  16 +--
 .../common-services/configs/hawq_default.json      |   5 +-
 .../test/python/custom_actions/TestCheckHost.py    |  16 +--
 .../test/python/custom_actions/TestUpdateRepo.py   |  41 +++++-
 .../configs/install_packages_config.json           | 158 +++++++++++++++++++--
 .../configs/install_packages_repository_file.json  | 158 +++++++++++++++++++--
 .../python/custom_actions/test_ru_execute_tasks.py |   4 +-
 .../test/python/custom_actions/test_ru_set_all.py  |   8 +-
 .../stacks/2.0.6/HBASE/test_hbase_regionserver.py  |   4 +-
 .../stacks/2.0.6/HIVE/test_webhcat_server.py       |  18 ---
 .../python/stacks/2.0.6/OOZIE/test_oozie_server.py |   2 +-
 .../test/python/stacks/2.0.6/configs/default.json  |  11 +-
 .../test/python/stacks/2.0.6/configs/secured.json  |   5 +-
 .../python/stacks/2.1/HIVE/test_hive_metastore.py  |   3 +-
 .../stacks/2.1/configs/hive-metastore-upgrade.json |   8 --
 .../python/stacks/2.2/common/test_conf_select.py   |   4 +-
 .../python/stacks/2.2/configs/oozie-upgrade.json   |   8 +-
 .../python/stacks/2.4/LOGSEARCH/test_logfeeder.py  |  36 +++--
 .../python/stacks/2.4/LOGSEARCH/test_logsearch.py  |  63 +++-----
 .../test/python/stacks/2.4/configs/default.json    |   8 +-
 .../python/stacks/2.5/HIVE/test_hive_server_int.py |  11 +-
 .../2.5/configs/hsi_default_for_restart.json       |   6 +-
 .../ru_execute_tasks_namenode_prepare.json         | 158 +++++++++++++++++++--
 35 files changed, 607 insertions(+), 232 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@ambari.apache.org" <co...@ambari.apache.org>'].

[ambari] 01/03: AMBARI-22784. Fix stack unit tests on branch-3.0-perf (aonishuk)

Posted by ao...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-3.0-perf
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 71620783bd7e3ad780c42fa5960f4a99e7c1534b
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Mon Jan 15 15:30:47 2018 +0200

    AMBARI-22784. Fix stack unit tests on branch-3.0-perf (aonishuk)
---
 .../main/python/ambari_stomp/adapter/websocket.py  |  9 +++-
 .../src/main/python/ambari_stomp/transport.py      | 19 ++++++-
 .../libraries/functions/lzo_utils.py               |  6 +--
 .../resource_management/libraries/script/script.py |  2 +-
 .../LOGSEARCH/0.5.0/package/scripts/logfeeder.py   |  7 ++-
 .../LOGSEARCH/0.5.0/package/scripts/logsearch.py   |  8 +--
 .../LOGSEARCH/0.5.0/package/scripts/params.py      | 18 +++----
 .../0.5.0/package/scripts/setup_logfeeder.py       |  2 +-
 .../0.5.0/package/scripts/setup_logsearch.py       |  2 +-
 .../common-services/configs/hawq_default.json      |  5 +-
 .../stacks/2.0.6/HBASE/test_hbase_regionserver.py  |  4 +-
 .../stacks/2.0.6/HIVE/test_webhcat_server.py       | 18 -------
 .../python/stacks/2.0.6/OOZIE/test_oozie_server.py |  2 +-
 .../test/python/stacks/2.0.6/configs/default.json  | 11 ++--
 .../test/python/stacks/2.0.6/configs/secured.json  |  5 +-
 .../python/stacks/2.1/HIVE/test_hive_metastore.py  |  3 +-
 .../stacks/2.1/configs/hive-metastore-upgrade.json |  8 ---
 .../python/stacks/2.2/configs/oozie-upgrade.json   |  8 ++-
 .../python/stacks/2.4/LOGSEARCH/test_logfeeder.py  | 36 ++++++-------
 .../python/stacks/2.4/LOGSEARCH/test_logsearch.py  | 63 ++++++----------------
 .../test/python/stacks/2.4/configs/default.json    |  8 +--
 .../python/stacks/2.5/HIVE/test_hive_server_int.py | 11 ++--
 .../2.5/configs/hsi_default_for_restart.json       |  6 ++-
 23 files changed, 120 insertions(+), 141 deletions(-)

diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
index 6cf19db..421fd88 100644
--- a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
+++ b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
@@ -54,13 +54,16 @@ class QueuedWebSocketClient(WebSocketClient):
     # left in the queue, return None immediately otherwise the client
     # will block forever
     if self.terminated and self.messages.empty():
+      logger.info("!!! RETURNING NONE")
       return None
     message = self.messages.get()
     if message is StopIteration:
+      logger.info("!!! RETURNING NONE DUE TO STOP_ITERATION")
       return None
     return message
 
   def closed(self, code, reason=None):
+    logger.info("!!!CLOSED IS CALLED {0} {1}", code, reason)
     self.messages.put(StopIteration)
 
 class WsTransport(Transport):
@@ -91,6 +94,7 @@ class WsTransport(Transport):
   def send(self, encoded_frame):
     logger.debug("Outgoing STOMP message:\n>>> " + encoded_frame)
     if self.ws.terminated:
+      logger.info("!!!SEND ERROR")
       raise ConnectionIsAlreadyClosed("Connection is already closed cannot send data")
 
     self.ws.send(encoded_frame)
@@ -99,7 +103,8 @@ class WsTransport(Transport):
     try:
       msg = self.ws.receive()
       msg = str(msg) if msg is not None else msg
-      logger.debug("Incoming STOMP message:\n<<< {0}".format(msg))
+      if not msg:
+        logger.info("Incoming STOMP message:\n<<< {0}".format(msg))
       return msg
     except:
       # exceptions from this method are hidden by the framework so implementing logging by ourselves
@@ -107,6 +112,7 @@ class WsTransport(Transport):
     return None
 
   def stop(self):
+    logger.info("!!!WsTransport.stop()")
     self.running = False
     try:
       self.ws.terminate()
@@ -131,6 +137,7 @@ class WsConnection(BaseConnection, Protocol12):
     Protocol12.__init__(self, self.transport, (0, 0))
 
   def disconnect(self, receipt=None, headers=None, **keyword_headers):
+    logger.info("!!!WsConnection.disconnect()")
     try:
       Protocol12.disconnect(self, receipt, headers, **keyword_headers)
     except:
diff --git a/ambari-common/src/main/python/ambari_stomp/transport.py b/ambari-common/src/main/python/ambari_stomp/transport.py
index 32604fc..8d85dcc 100644
--- a/ambari-common/src/main/python/ambari_stomp/transport.py
+++ b/ambari-common/src/main/python/ambari_stomp/transport.py
@@ -326,6 +326,7 @@ class BaseTransport(ambari_stomp.listener.Publisher):
         """
         Main loop listening for incoming data.
         """
+        
         log.info("Starting receiver loop")
         try:
             while self.running:
@@ -340,8 +341,12 @@ class BaseTransport(ambari_stomp.listener.Publisher):
                             if self.__auto_decode:
                                 f.body = decode(f.body)
                             self.process_frame(f, frame)
+                            
+                    log.info("!!NOT RUNNING")
                 except exception.ConnectionClosedException:
+                    log.exception("!!except exception.ConnectionClosedException:")
                     if self.running:
+                        log.info("!!except exception.ConnectionClosedException if self.running")
                         self.notify('disconnected')
                         #
                         # Clear out any half-received messages after losing connection
@@ -349,8 +354,16 @@ class BaseTransport(ambari_stomp.listener.Publisher):
                         self.__recvbuf = b''
                         self.running = False
                     break
+                except:
+                    log.exception("!!!EXCEPTION at loop")
+                    raise
                 finally:
+                    log.info("!!!CLEANUP")
                     self.cleanup()
+            log.info("!!NOT RUNNING BIG LOOP")
+        except:
+          log.exception("!!!EXCEPTION at big loop")
+          raise
         finally:
             with self.__receiver_thread_exit_condition:
                 self.__receiver_thread_exited = True
@@ -370,12 +383,13 @@ class BaseTransport(ambari_stomp.listener.Publisher):
                 try:
                     c = self.receive()
                 except exception.InterruptedException:
-                    log.debug("socket read interrupted, restarting")
+                    log.info("!!!socket read interrupted, restarting")
                     continue
             except Exception:
-                log.debug("socket read error", exc_info=True)
+                log.info("!!!socket read error", exc_info=True)
                 c = b''
             if c is None or len(c) == 0:
+                log.error("!!ConnectionClosedException!!! {0}".format(c))
                 raise exception.ConnectionClosedException()
             if c == b'\x0a' and not self.__recvbuf and not fastbuf.tell():
                 #
@@ -576,6 +590,7 @@ class Transport(BaseTransport):
         """
         Disconnect the underlying socket connection
         """
+        log.info("!!!disconnect_socket")
         self.running = False
         if self.socket is not None:
             if self.__need_ssl():
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py b/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py
index 68ee607..ffe6eb9 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py
@@ -65,7 +65,7 @@ def should_install_lzo():
   if not lzo_enabled:
     return False
 
-  is_gpl_license_accepted = default("/hostLevelParams/gpl_license_accepted", False)
+  is_gpl_license_accepted = default("/ambariLevelParams/gpl_license_accepted", False)
   if not is_gpl_license_accepted:
     Logger.warning(INSTALLING_LZO_WITHOUT_GPL)
     return False
@@ -82,8 +82,8 @@ def install_lzo_if_needed():
   lzo_packages = get_lzo_packages()
 
   config = Script.get_config()
-  agent_stack_retry_on_unavailability = config['hostLevelParams']['agent_stack_retry_on_unavailability']
-  agent_stack_retry_count = expect("/hostLevelParams/agent_stack_retry_count", int)
+  agent_stack_retry_on_unavailability = config['ambariLevelParams']['agent_stack_retry_on_unavailability']
+  agent_stack_retry_count = expect("/ambariLevelParams/agent_stack_retry_count", int)
 
   Package(lzo_packages,
           retry_on_repo_unavailability=agent_stack_retry_on_unavailability,
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 65c4920..98dc9df 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -942,7 +942,7 @@ class Script(object):
     else:
       # To remain backward compatible with older stacks, only pass upgrade_type if available.
       # TODO, remove checking the argspec for "upgrade_type" once all of the services support that optional param.
-      if "upgrade_type" in inspect.getargspec(self.stop).args:
+      if True:
         self.stop(env, upgrade_type=upgrade_type)
       else:
         if is_stack_upgrade:
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
index fbc29c8..2f6c13c 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
@@ -23,7 +23,6 @@ from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.check_process_status import check_process_status
 from resource_management.libraries.script.script import Script
 from setup_logfeeder import setup_logfeeder
-from logsearch_common import kill_process
 
 class LogFeeder(Script):
   def install(self, env):
@@ -43,15 +42,15 @@ class LogFeeder(Script):
     env.set_params(params)
     self.configure(env)
 
-    Execute((format('{logfeeder_dir}/run.sh'),),
-            environment={'LOGFEEDER_INCLUDE': format('{logsearch_logfeeder_conf}/logfeeder-env.sh')},
+    Execute((format('{logfeeder_dir}/bin/logfeeder.sh start'),),
             sudo=True)
 
   def stop(self, env, upgrade_type=None):
     import params
     env.set_params(params)
 
-    kill_process(params.logfeeder_pid_file, getpass.getuser(), params.logfeeder_log_dir)
+    Execute((format('{logfeeder_dir}/bin/logfeeder.sh stop'),),
+            sudo=True)
 
   def status(self, env):
     import status_params
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logsearch.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logsearch.py
index 4410712..a276357 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logsearch.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logsearch.py
@@ -22,7 +22,6 @@ from resource_management.libraries.functions.check_process_status import check_p
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.script.script import Script
 from setup_logsearch import setup_logsearch
-from logsearch_common import kill_process
 
 class LogSearch(Script):
   def install(self, env):
@@ -41,8 +40,7 @@ class LogSearch(Script):
     env.set_params(params)
     self.configure(env)
 
-    Execute(format("{logsearch_dir}/run.sh"),
-            environment={'LOGSEARCH_INCLUDE': format('{logsearch_server_conf}/logsearch-env.sh')},
+    Execute(format("{logsearch_dir}/bin/logsearch.sh start"),
             user=params.logsearch_user
             )
 
@@ -50,7 +48,9 @@ class LogSearch(Script):
     import params
     env.set_params(params)
 
-    kill_process(params.logsearch_pid_file, params.logsearch_user, params.logsearch_log_dir)
+    Execute(format("{logsearch_dir}/bin/logsearch.sh stop"),
+            user=params.logsearch_user
+            )
 
   def status(self, env):
     import status_params
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
index 8c8275a..5dd3657 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
@@ -56,9 +56,9 @@ credential_store_enabled = False
 if 'credentialStoreEnabled' in config:
   credential_store_enabled = config['credentialStoreEnabled']
 
-logsearch_server_conf = "/etc/ambari-logsearch-portal/conf"
+logsearch_server_conf = "/usr/lib/ambari-logsearch-portal/conf"
 logsearch_server_keys_folder = logsearch_server_conf + "/keys"
-logsearch_logfeeder_conf = "/etc/ambari-logsearch-logfeeder/conf"
+logsearch_logfeeder_conf = "/usr/lib/ambari-logsearch-logfeeder/conf"
 logsearch_logfeeder_keys_folder = logsearch_logfeeder_conf + "/keys"
 
 logsearch_config_set_dir = format("{logsearch_server_conf}/solr_configsets")
@@ -75,7 +75,7 @@ user_group = config['configurations']['cluster-env']['user_group']
 
 # shared configs
 java_home = config['ambariLevelParams']['java_home']
-ambari_java_home = default("/ambariLevelParams/ambari_java_home", None)
+ambari_java_home = default("/commandParams/ambari_java_home", None)
 java64_home = ambari_java_home if ambari_java_home is not None else java_home
 cluster_name = str(config['clusterName'])
 
@@ -114,7 +114,7 @@ infra_solr_role_logfeeder = default('configurations/infra-solr-security-json/inf
 infra_solr_role_dev = default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')
 infra_solr_role_ranger_admin = default('configurations/infra-solr-security-json/infra_solr_role_ranger_admin', 'ranger_user')
 
-_hostname_lowercase = config['agentLevelParams']['hostname'].lower()
+_hostname_lowercase = config['hostname'].lower()
 if security_enabled:
   kinit_path_local = status_params.kinit_path_local
   logsearch_jaas_file = logsearch_server_conf + '/logsearch_jaas.conf'
@@ -156,8 +156,8 @@ else:
 
   logsearch_solr_zk_quorum = ""
   zookeeper_port = default('/configurations/zoo.cfg/clientPort', None)
-  if 'zookeeper_hosts' in config['clusterHostInfo']:
-    for host in config['clusterHostInfo']['zookeeper_hosts']:
+  if 'zookeeper_server_hosts' in config['clusterHostInfo']:
+    for host in config['clusterHostInfo']['zookeeper_server_hosts']:
       if logsearch_solr_zk_quorum:
         logsearch_solr_zk_quorum += ','
       logsearch_solr_zk_quorum += host + ":" + str(zookeeper_port)
@@ -170,7 +170,7 @@ zookeeper_quorum = logsearch_solr_zk_quorum
 # logsearch-env configs
 logsearch_user = config['configurations']['logsearch-env']['logsearch_user']
 logsearch_log_dir = config['configurations']['logsearch-env']['logsearch_log_dir']
-logsearch_log = logsearch_log_dir + '/logsearch.out'
+logsearch_log = 'logsearch.out'
 logsearch_debug_enabled = str(config['configurations']['logsearch-env']["logsearch_debug_enabled"]).lower()
 logsearch_debug_port = config['configurations']['logsearch-env']["logsearch_debug_port"]
 logsearch_app_max_memory = config['configurations']['logsearch-env']['logsearch_app_max_memory']
@@ -253,8 +253,6 @@ logsearch_properties['logsearch.auth.file.enabled'] = 'true'
 logsearch_properties['logsearch.auth.ldap.enabled'] = 'false'
 logsearch_properties['logsearch.auth.simple.enabled'] = 'false'
 
-logsearch_properties['logsearch.protocol'] = logsearch_ui_protocol
-
 # load config values
 
 logsearch_properties = dict(logsearch_properties.items() +\
@@ -306,7 +304,7 @@ logfeeder_json_log_maxbackupindex = default('/configurations/logfeeder-log4j/log
 
 # logfeeder-env configs
 logfeeder_log_dir = config['configurations']['logfeeder-env']['logfeeder_log_dir']
-logfeeder_log = logfeeder_log_dir + '/logfeeder.out'
+logfeeder_log = 'logfeeder.out'
 logfeeder_max_mem = config['configurations']['logfeeder-env']['logfeeder_max_mem']
 solr_service_logs_enable = default('/configurations/logfeeder-env/logfeeder_solr_service_logs_enable', True)
 solr_audit_logs_enable = default('/configurations/logfeeder-env/logfeeder_solr_audit_logs_enable', True)
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logfeeder.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logfeeder.py
index 653d604..52b1d76 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logfeeder.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logfeeder.py
@@ -40,7 +40,7 @@ def setup_logfeeder():
             recursive_ownership=True
             )
 
-  File(params.logfeeder_log,
+  File(format("{logfeeder_log_dir}/{logfeeder_log}"),
        mode=0644,
        content=''
        )
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch.py
index 7738cc1..e804b9a 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch.py
@@ -53,7 +53,7 @@ def setup_logsearch():
             owner=params.logsearch_user,
             group=params.user_group)
 
-  File(params.logsearch_log,
+  File(format("{logsearch_log_dir}/{logsearch_log}"),
        mode=0644,
        owner=params.logsearch_user,
        group=params.user_group,
diff --git a/ambari-server/src/test/python/common-services/configs/hawq_default.json b/ambari-server/src/test/python/common-services/configs/hawq_default.json
index 4d22e64..fbfc5c0 100644
--- a/ambari-server/src/test/python/common-services/configs/hawq_default.json
+++ b/ambari-server/src/test/python/common-services/configs/hawq_default.json
@@ -8,15 +8,14 @@
         "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
         "script": "scripts/service_check.py", 
         "hooks_folder": "stack-hooks", 
-        "version": "2.1.0.0-1234", 
         "command_timeout": "300", 
         "script_type": "PYTHON"
     },
     "clusterLevelParams": {
-        "stack_version": "2.1", 
+        "stack_version": "3.3", 
         "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
         "hooks_folder": "stack-hooks", 
-        "stack_name": "HDP", 
+        "stack_name": "PHD", 
         "group_list": "[\"hdfs\",\"hadoop\",\"users\"]", 
         "user_groups": "{\"hive\":[\"hadoop\"], \"oozie\":[\"hadoop\",\"users\"], \"nobody\":[\"hadoop\",\"nobody\"], \"ambari-qa\":[\"hadoop\",\"users\"], \"flume\":[\"hadoop\"], \"hdfs\":[\"hadoop\"], \"storm\":[\"hadoop\"], \"mapred\":[\"hadoop\"], \"hbase\":[\"hadoop\"], \"tez\":[\"hadoop\",\"users\"], \"zookeeper\":[\"hadoop\"], \"falcon\":[\"hadoop\",\"users\"], \"sqoop\":[\"hadoop\"], \"yarn\":[\"hadoop\"], \"hcat\":[\"hadoop\"]}",
         "cluster_name": "c1", 
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
index a1dbf00..252f14e 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
@@ -18,11 +18,11 @@ See the License for the specific language governing permissions and
 limitations under the License.
 '''
 import json
-#import upgrade
+import upgrade
 from mock.mock import MagicMock, patch
 from stacks.utils.RMFTestCase import *
 
-#@patch.object(upgrade, 'check_process_status', new = MagicMock())
+@patch.object(upgrade, 'check_process_status', new = MagicMock())
 @patch("platform.linux_distribution", new = MagicMock(return_value="Linux"))
 @patch("os.path.exists", new = MagicMock(return_value=True))
 class TestHbaseRegionServer(RMFTestCase):
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
index 9578488..86b0782 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
@@ -228,24 +228,6 @@ class TestWebHCatServer(RMFTestCase):
                               configurations = self.getConfig()['configurations']['webhcat-site'],
                               configuration_attributes = self.getConfig()['configurationAttributes']['webhcat-site']
     )
-    self.assertResourceCalled('XmlConfig', 'hive-site.xml',
-        owner = 'hive',
-        group = 'hadoop',
-        conf_dir = '/usr/hdp/2.1.0.0-1234/hive/conf',
-        configuration_attributes = {u'final': {u'hive.optimize.bucketmapjoin.sortedmerge': u'true',
-                      u'javax.jdo.option.ConnectionDriverName': u'true',
-                      u'javax.jdo.option.ConnectionPassword': u'true'}},
-        configurations = self.getConfig()['configurations']['hive-site'],
-    )
-    self.assertResourceCalled('XmlConfig', 'yarn-site.xml',
-        owner = 'yarn',
-        group = 'hadoop',
-        conf_dir = '/usr/hdp/2.1.0.0-1234/hadoop/conf',
-        configuration_attributes = {u'final': {u'yarn.nodemanager.container-executor.class': u'true',
-                      u'yarn.nodemanager.disk-health-checker.min-healthy-disks': u'true',
-                      u'yarn.nodemanager.local-dirs': u'true'}},
-        configurations = self.getConfig()['configurations']['yarn-site'],
-    )
     self.assertResourceCalled('File', '/usr/hdp/current/hive-webhcat/etc/webhcat/webhcat-env.sh',
                               content = InlineTemplate(self.getConfig()['configurations']['webhcat-env']['content']),
                               owner = 'hcat',
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 d4ec2c7..c7f64ee 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
@@ -1479,7 +1479,7 @@ class TestOozieServer(RMFTestCase):
 
     version = '2.3.0.0-1234'
     json_content['commandParams']['version'] = version
-    json_content['hostLevelParams']['stack_name'] = "HDP"
+    json_content['clusterLevelParams']['stack_name'] = "HDP"
     json_content['clusterLevelParams']['stack_version'] = "2.3"
 
     # use mysql external database
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index 4a2974a..84975f9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -26,7 +26,6 @@
         "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
         "script": "scripts/service_check.py", 
         "hooks_folder": "stack-hooks", 
-        "version": "2.1.0.0-1234",
         "excluded_hosts": "host1,host2",
         "command_timeout": "300", 
         "script_type": "PYTHON",
@@ -36,7 +35,7 @@
         "output_file":"HDFS_CLIENT-configs.tar.gz"
     }, 
     "clusterLevelParams": {
-        "stack_version": "2.1", 
+        "stack_version": "2.0", 
         "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]", 
         "hooks_folder": "stack-hooks", 
         "stack_name": "HDP", 
@@ -61,7 +60,11 @@
         "ambari_db_rca_username": "mapred", 
         "jdk_name": "jdk-7u67-linux-x64.tar.gz", 
         "java_home": "/usr/jdk64/jdk1.7.0_45", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar"
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar",
+        "custom_mysql_jdbc_name" : "mysql-connector-java.jar",
+        "custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar",
+        "custom_postgres_jdbc_name" : "test-postgres-jdbc.jar",
+        "custom_sqlanywhere_jdbc_name" : "sqla-client-jdbc.tar.gz"
     }, 
     "repositoryFile": {
         "resolved": true, 
@@ -1366,7 +1369,7 @@
         "hbase_master_hosts": [
             "c6402.ambari.apache.org"
         ],
-        "hive_mysql_host": [
+        "hive_mysql_hosts": [
             "c6402.ambari.apache.org"
         ],
         "falcon_server_hosts": [
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
index 91205dc..6debc75 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
@@ -40,7 +40,10 @@
         "ambari_db_rca_username": "mapred", 
         "jdk_name": "jdk-7u45-linux-x64.tar.gz", 
         "java_home": "/usr/jdk64/jdk1.7.0_45", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar"
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar",
+        "custom_mysql_jdbc_name" : "mysql-connector-java.jar",
+        "custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar",
+        "custom_postgres_jdbc_name" : "test-postgres-jdbc.jar"
     },
     "repositoryFile": {
         "resolved": true, 
diff --git a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
index 161e40a..2116f6c 100644
--- a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
@@ -578,12 +578,14 @@ class TestHiveMetastore(RMFTestCase):
      'hive-metastore',
      '2.4.0.0-1234'),
         sudo = True)
+      
 
     # we don't care about configure here - the strings are different anyway because this
     # is an upgrade, so just pop those resources off of the call stack
     self.assertResourceCalledIgnoreEarlier('Directory', '/var/lib/hive', owner = 'hive', group = 'hadoop',
       mode = 0755, create_parents = True, cd_access = 'a')
 
+
     self.assertResourceCalledIgnoreEarlier('Execute', ('rm', '-f', '/usr/hdp/current/hive-metastore/lib/ojdbc6.jar'),
         path = ['/bin', '/usr/bin/'],
         sudo = True)
@@ -788,7 +790,6 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalledIgnoreEarlier('Directory', '/var/lib/hive', owner = 'hive', group = 'hadoop',
       mode = 0755, create_parents = True, cd_access = 'a')
 
-    self.printResources()
     self.assertResourceCalled('Execute',
                               ('rm', '-f', '/usr/hdp/current/hive-metastore/lib/ojdbc6.jar'),
                               path=["/bin", "/usr/bin/"],
diff --git a/ambari-server/src/test/python/stacks/2.1/configs/hive-metastore-upgrade.json b/ambari-server/src/test/python/stacks/2.1/configs/hive-metastore-upgrade.json
index 7a8a9fd..c421e79 100644
--- a/ambari-server/src/test/python/stacks/2.1/configs/hive-metastore-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.1/configs/hive-metastore-upgrade.json
@@ -22,14 +22,6 @@
     "kerberosCommandParams": [], 
     "clusterName": "c1", 
     "hostname": "c6402.ambari.apache.org", 
-    "commandParams": {
-        "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
-        "script": "scripts/service_check.py", 
-        "hooks_folder": "stack-hooks", 
-        "version": "2.3.2.0-2950", 
-        "command_timeout": "300", 
-        "script_type": "PYTHON"
-    },
     "clusterLevelParams": {
         "stack_version": "2.3", 
         "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
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 d042cf8..8c8fb82 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
@@ -29,7 +29,6 @@
     "roleCommand": "CUSTOM_COMMAND", 
     "kerberosCommandParams": [], 
     "clusterName": "c1", 
-    "hostname": "c6402.ambari.apache.org", 
     "clusterLevelParams": {
         "stack_version": "2.2", 
         "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
@@ -56,7 +55,12 @@
         "ambari_db_rca_username": "mapred", 
         "jdk_name": "jdk-7u45-linux-x64.tar.gz", 
         "java_home": "/usr/jdk64/jdk1.7.0_45", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar"
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar",
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org:8080/resources//mysql-connector-java.jar",
+        "custom_mysql_jdbc_name" : "mysql-connector-java.jar",
+        "custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar",
+        "custom_postgres_jdbc_name" : "test-postgres-jdbc.jar",
+        "gpl_license_accepted": "true"        
     },
     "repositoryFile": {
         "resolved": true, 
diff --git a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
index 159cb81..6997a77 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
@@ -37,7 +37,7 @@ class TestLogFeeder(RMFTestCase):
                               cd_access='a',
                               mode=0755
                               )
-    self.assertResourceCalled('Directory', '/etc/ambari-logsearch-logfeeder/conf/checkpoints',
+    self.assertResourceCalled('Directory', '/usr/lib/ambari-logsearch-logfeeder/conf/checkpoints',
                               create_parents=True,
                               cd_access='a',
                               mode=0755
@@ -49,7 +49,7 @@ class TestLogFeeder(RMFTestCase):
                               cd_access='a',
                               mode=0755
                               )
-    self.assertResourceCalled('Directory', '/etc/ambari-logsearch-logfeeder/conf',
+    self.assertResourceCalled('Directory', '/usr/lib/ambari-logsearch-logfeeder/conf',
                               create_parents=True,
                               recursive_ownership=True,
                               cd_access='a',
@@ -60,18 +60,18 @@ class TestLogFeeder(RMFTestCase):
                               mode=0644,
                               content=''
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/keys/ks_pass.txt',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/keys/ks_pass.txt',
                               action = ['delete']
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/keys/ts_pass.txt',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/keys/ts_pass.txt',
                               action = ['delete']
                               )
-    self.assertResourceCalled('PropertiesFile', '/etc/ambari-logsearch-logfeeder/conf/logfeeder.properties',
+    self.assertResourceCalled('PropertiesFile', '/usr/lib/ambari-logsearch-logfeeder/conf/logfeeder.properties',
                               properties={'cluster.name': 'c1',
                                           'common-property': 'common-value',
-                                          'hadoop.security.credential.provider.path': 'jceks://file/etc/ambari-logsearch-logfeeder/conf/logfeeder.jceks',
-                                          'logfeeder.checkpoint.folder': '/etc/ambari-logsearch-logfeeder/conf/checkpoints',
-                                          'logfeeder.config.dir': '/etc/ambari-logsearch-logfeeder/conf',
+                                          'hadoop.security.credential.provider.path': 'jceks://file/usr/lib/ambari-logsearch-logfeeder/conf/logfeeder.jceks',
+                                          'logfeeder.checkpoint.folder': '/usr/lib/ambari-logsearch-logfeeder/conf/checkpoints',
+                                          'logfeeder.config.dir': '/usr/lib/ambari-logsearch-logfeeder/conf',
                                           'logfeeder.config.files': 'output.config.json,global.config.json',
                                           'logfeeder.metrics.collector.hosts': '',
                                           'logfeeder.metrics.collector.path': '/ws/v1/timeline/metrics',
@@ -82,25 +82,25 @@ class TestLogFeeder(RMFTestCase):
                                           'logsearch.config.zk_connect_string': 'c6401.ambari.apache.org:2181'
                                          }
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/logfeeder-env.sh',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/logfeeder-env.sh',
                               mode=0755,
                               content=InlineTemplate(self.getConfig()['configurations']['logfeeder-env']['content'])
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/log4j.xml',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/log4j.xml',
                               content=InlineTemplate(self.getConfig()['configurations']['logfeeder-log4j']['content'])
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/grok-patterns',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/grok-patterns',
                               content=InlineTemplate('GP'),
                               encoding='utf-8'
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/global.config.json',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/global.config.json',
                               content=Template('global.config.json.j2')
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/input.config-ambari.json',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/input.config-ambari.json',
                               content=InlineTemplate('ambari-grok-filter'),
                               encoding='utf-8'
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-logfeeder/conf/output.config.json',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-logfeeder/conf/output.config.json',
                               content=InlineTemplate('output-grok-filter'),
                               encoding='utf-8'
                               )
@@ -127,8 +127,6 @@ class TestLogFeeder(RMFTestCase):
                        )
 
     self.configureResourcesCalled()
-    self.assertResourceCalled('Execute', ('/usr/lib/ambari-logsearch-logfeeder/run.sh',),
-                              sudo=True,
-                              environment={
-                                'LOGFEEDER_INCLUDE': '/etc/ambari-logsearch-logfeeder/conf/logfeeder-env.sh'}
-                              )
+    self.assertResourceCalled('Execute', ('/usr/lib/ambari-logsearch-logfeeder/bin/logfeeder.sh start',),
+                              sudo=True
+                              )
\ No newline at end of file
diff --git a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
index db19e0f..a53dae3 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
@@ -47,7 +47,7 @@ class TestLogSearch(RMFTestCase):
                               cd_access = 'a',
                               mode = 0755
     )
-    self.assertResourceCalled('Directory', '/etc/ambari-logsearch-portal/conf',
+    self.assertResourceCalled('Directory', '/usr/lib/ambari-logsearch-portal/conf',
                               owner = 'logsearch',
                               group = 'hadoop',
                               create_parents = True,
@@ -55,7 +55,7 @@ class TestLogSearch(RMFTestCase):
                               cd_access = 'a',
                               mode = 0755
     )
-    self.assertResourceCalled('Directory', '/etc/ambari-logsearch-portal/conf/solr_configsets',
+    self.assertResourceCalled('Directory', '/usr/lib/ambari-logsearch-portal/conf/solr_configsets',
                               owner = 'logsearch',
                               group = 'hadoop',
                               create_parents = True,
@@ -63,7 +63,7 @@ class TestLogSearch(RMFTestCase):
                               cd_access = 'a',
                               mode = 0755
                               )
-    self.assertResourceCalled('Directory', '/etc/ambari-logsearch-portal/conf/keys',
+    self.assertResourceCalled('Directory', '/usr/lib/ambari-logsearch-portal/conf/keys',
                               owner = 'logsearch',
                               group = 'hadoop',
                               cd_access = 'a',
@@ -76,77 +76,47 @@ class TestLogSearch(RMFTestCase):
                               mode = 0644,
                               content = ''
     )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/keys/ks_pass.txt',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/keys/ks_pass.txt',
                               action = ['delete']
     )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/keys/ts_pass.txt',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/keys/ts_pass.txt',
                               action = ['delete']
     )
-    self.assertResourceCalled('PropertiesFile', '/etc/ambari-logsearch-portal/conf/logsearch.properties',
-                              properties = {'common-property': 'common-value',
-                                            'hadoop.security.credential.provider.path': 'jceks://file/etc/ambari-logsearch-portal/conf/logsearch.jceks',
-                                            'logsearch.audit.logs.split.interval.mins': '1',
-                                            'logsearch.auth.external_auth.enabled': 'false',
-                                            'logsearch.auth.external_auth.host_url': 'http://c6401.ambari.apache.org:8080',
-                                            'logsearch.auth.external_auth.login_url': '/api/v1/users/$USERNAME/privileges?fields=*',
-                                            'logsearch.auth.file.enabled': 'true',
-                                            'logsearch.auth.ldap.enabled': 'false',
-                                            'logsearch.auth.simple.enabled': 'false',
-                                            'logsearch.collection.audit.logs.numshards': '10',
-                                            'logsearch.collection.audit.logs.replication.factor': '1',
-                                            'logsearch.collection.history.replication.factor': '1',
-                                            'logsearch.collection.service.logs.numshards': '10',
-                                            'logsearch.collection.service.logs.replication.factor': '1',
-                                            'logsearch.config.zk_connect_string': 'c6401.ambari.apache.org:2181',
-                                            'logsearch.login.credentials.file': 'logsearch-admin.json',
-                                            'logsearch.protocol': 'http',
-                                            'logsearch.http.port': '61888',
-                                            'logsearch.https.port': '61888',
-                                            'logsearch.roles.allowed': 'AMBARI.ADMINISTRATOR,CLUSTER.ADMINISTRATOR',
-                                            'logsearch.service.logs.split.interval.mins': '1',
-                                            'logsearch.solr.audit.logs.zk_connect_string': 'c6401.ambari.apache.org:2181/infra-solr',
-                                            'logsearch.solr.collection.audit.logs': 'audit_logs',
-                                            'logsearch.solr.collection.history': 'history',
-                                            'logsearch.solr.collection.service.logs': 'hadoop_logs',
-                                            'logsearch.solr.history.config.name': 'history',
-                                            'logsearch.solr.metrics.collector.hosts': '',
-                                            'logsearch.solr.jmx.port': '1',
-                                            'logsearch.solr.zk_connect_string': 'c6401.ambari.apache.org:2181/infra-solr',
-                                            'logsearch.spnego.kerberos.host': 'localhost'
-                              }
+    self.assertResourceCalled('PropertiesFile', '/usr/lib/ambari-logsearch-portal/conf/logsearch.properties',
+                              properties = {'logsearch.login.credentials.file': 'logsearch-admin.json', u'logsearch.https.port': u'61888', 'logsearch.auth.file.enabled': 'true', u'logsearch.http.port': u'61888', 'logsearch.config.zk_connect_string': u'c6401.ambari.apache.org:2181', 'logsearch.solr.collection.history': 'history', 'logsearch.auth.ldap.enabled': 'false', u'logsearch.service.logs.split.interval.mins': u'1', u'logsearch.solr.metrics.collector.hosts': '', u'logsearch.solr.coll [...]
     )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/HadoopServiceConfig.json',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/HadoopServiceConfig.json',
                               owner = 'logsearch',
                               group='hadoop',
                               content = Template('HadoopServiceConfig.json.j2')
     )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/log4j.xml',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/log4j.xml',
                               owner = 'logsearch',
                               group='hadoop',
                               content = InlineTemplate(self.getConfig()['configurations']['logsearch-log4j']['content'])
     )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/logsearch-env.sh',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/logsearch-env.sh',
                               content = InlineTemplate(self.getConfig()['configurations']['logsearch-env']['content']),
                               mode = 0755,
                               owner = "logsearch",
                               group='hadoop'
     )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/logsearch-admin.json',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/logsearch-admin.json',
                               owner = 'logsearch',
                               group='hadoop',
                               content = InlineTemplate(self.getConfig()['configurations']['logsearch-admin-json']['content'])
                               )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/solr_configsets/hadoop_logs/conf/solrconfig.xml',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/solr_configsets/hadoop_logs/conf/solrconfig.xml',
                               owner = 'logsearch',
                               group='hadoop',
                               content = InlineTemplate(self.getConfig()['configurations']['logsearch-service_logs-solrconfig']['content'])
     )
-    self.assertResourceCalled('File', '/etc/ambari-logsearch-portal/conf/solr_configsets/audit_logs/conf/solrconfig.xml',
+    self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-portal/conf/solr_configsets/audit_logs/conf/solrconfig.xml',
                               owner = 'logsearch',
                               group='hadoop',
                               content = InlineTemplate(self.getConfig()['configurations']['logsearch-audit_logs-solrconfig']['content'])
                               )
-    self.assertResourceCalled('Execute', ('chmod', '-R', 'ugo+r', '/etc/ambari-logsearch-portal/conf/solr_configsets'),
+    self.assertResourceCalled('Execute', ('chmod', '-R', 'ugo+r', '/usr/lib/ambari-logsearch-portal/conf/solr_configsets'),
                               sudo = True
     )
     self.assertResourceCalled('Execute', 'ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181 --znode /infra-solr --check-znode --retry 30 --interval 5')
@@ -174,7 +144,6 @@ class TestLogSearch(RMFTestCase):
     )
 
     self.configureResourcesCalled()
-    self.assertResourceCalled('Execute', "/usr/lib/ambari-logsearch-portal/run.sh",
-                              environment = {'LOGSEARCH_INCLUDE': '/etc/ambari-logsearch-portal/conf/logsearch-env.sh'},
+    self.assertResourceCalled('Execute', "/usr/lib/ambari-logsearch-portal/bin/logsearch.sh start",
                               user = "logsearch"
-    )
+    )
\ No newline at end of file
diff --git a/ambari-server/src/test/python/stacks/2.4/configs/default.json b/ambari-server/src/test/python/stacks/2.4/configs/default.json
index 5c3b8ea..fd040cf 100644
--- a/ambari-server/src/test/python/stacks/2.4/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.4/configs/default.json
@@ -14,7 +14,7 @@
     },
     "ambariLevelParams": {
         "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
-        "agent_stack_retry_count": "5", 
+        "agent_stack_retry_count": "5",
         "db_driver_filename": "mysql-connector-java.jar", 
         "agent_stack_retry_on_unavailability": "false", 
         "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
@@ -448,7 +448,7 @@
         "logsearch.roles.allowed": "AMBARI.ADMINISTRATOR,CLUSTER.ADMINISTRATOR"
       },
       "logfeeder-properties": {
-        "logfeeder.checkpoint.folder" : "/etc/ambari-logsearch-logfeeder/conf/checkpoints",
+        "logfeeder.checkpoint.folder" : "/usr/lib/ambari-logsearch-logfeeder/conf/checkpoints",
         "logfeeder.metrics.collector.hosts" : "{metrics_collector_hosts}",
         "logfeeder.config.files" : "{default_config_files}"
       },
@@ -475,7 +475,7 @@
         "content": "&lt;?xml version=\"1.0\" encoding=\"UTF-8\" ?&gt;\n&lt;!--\n  Licensed to the Apache Software Foundation (ASF) under one or more\n  contributor license agreements.  See the NOTICE file distributed with\n  this work for additional information regarding copyright ownership.\n  The ASF licenses this file to You under the Apache License, Version 2.0\n  (the \"License\"); you may not use this file except in compliance with\n  the License.  You may obtain a copy of the Lice [...]
       }
     },
-    "configurationAttributes": {
+    "configuration_attributes": {
         "sqoop-site": {},
         "yarn-site": {
             "final": {
@@ -570,7 +570,7 @@
         "8670",
         "8670"
       ],
-      "resourcemanager_hosts": [
+      "rm_host": [
         "c6402.ambari.apache.org"
       ],
       "all_hosts": [
diff --git a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 4eb16c2..77ec85e 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -257,6 +257,7 @@ class TestHiveServerInteractive(RMFTestCase):
                        config_file=self.get_src_folder() + "/test/python/stacks/2.5/configs/hsi_default_for_restart.json",
                        stack_version=self.STACK_VERSION,
                        target=RMFTestCase.TARGET_COMMON_SERVICES,
+                       call_mocks = [(0, "OK.", ""), (0, "OK."), (0, "OK."), (0, "OK."), (0, "OK.")],
                        checked_call_mocks=[(0, "OK.", ""),
                                            #(0, "OK.", ""),
                                            (0, "UNWANTED_STRING \n "
@@ -288,7 +289,12 @@ class TestHiveServerInteractive(RMFTestCase):
     self.assertResourceCalled('File', '/var/run/hive/hive-interactive.pid',
                               action=['delete'],
                               )
-
+    self.assertResourceCalled('Execute', ('slider', 'destroy', u'llap0', '--force'),
+        ignore_failures = True,
+        user = 'hive',
+        timeout = 30,
+    )
+    
     self.assert_configure_default(with_cs_enabled=True)
 
     self.assertResourceCalled('Execute',
@@ -412,7 +418,6 @@ class TestHiveServerInteractive(RMFTestCase):
 
 
   def assert_configure_default(self, no_tmp=False, default_fs_default=u'hdfs://c6401.ambari.apache.org:8020', with_cs_enabled=False):
-
     self.assertResourceCalled('HdfsResource', '/apps/hive/warehouse',
                               immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
                               security_enabled = False,
@@ -1393,4 +1398,4 @@ class TestHiveServerInteractive(RMFTestCase):
     mock_get_llap_app_status_data.return_value = llap_app_json
 
     status = self.hsi.check_llap_app_status_in_llap_ga(self.llap_app_name, 2)
-    self.assertEqual(status, False)
+    self.assertEqual(status, False)
\ No newline at end of file
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json
index a3c8f01..81c009e 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json
@@ -28,7 +28,11 @@
         "ambari_db_rca_username": "mapred", 
         "jdk_name": "jdk-7u45-linux-x64.tar.gz", 
         "java_home": "/usr/jdk64/jdk1.7.0_45", 
-        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar"
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar",
+        "custom_mysql_jdbc_name" : "mysql-connector-java.jar",
+        "custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar",
+        "custom_postgres_jdbc_name" : "test-postgres-jdbc.jar",
+        "custom_sqlanywhere_jdbc_name" : "sqla-client-jdbc.tar.gz"
     },
     "repositoryFile": {
         "resolved": true, 

-- 
To stop receiving notification emails like this one, please contact
"commits@ambari.apache.org" <co...@ambari.apache.org>.

[ambari] 02/03: AMBARI-22784. Fix stack unit tests on branch-3.0-perf (aonishuk)

Posted by ao...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-3.0-perf
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 04a71b9606c7d8f18b480fe0d84453b2ddf3f996
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Mon Jan 15 15:36:26 2018 +0200

    AMBARI-22784. Fix stack unit tests on branch-3.0-perf (aonishuk)
---
 .../src/main/python/ambari_stomp/adapter/websocket.py |  9 +--------
 .../src/main/python/ambari_stomp/transport.py         | 19 ++-----------------
 2 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
index 421fd88..6cf19db 100644
--- a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
+++ b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
@@ -54,16 +54,13 @@ class QueuedWebSocketClient(WebSocketClient):
     # left in the queue, return None immediately otherwise the client
     # will block forever
     if self.terminated and self.messages.empty():
-      logger.info("!!! RETURNING NONE")
       return None
     message = self.messages.get()
     if message is StopIteration:
-      logger.info("!!! RETURNING NONE DUE TO STOP_ITERATION")
       return None
     return message
 
   def closed(self, code, reason=None):
-    logger.info("!!!CLOSED IS CALLED {0} {1}", code, reason)
     self.messages.put(StopIteration)
 
 class WsTransport(Transport):
@@ -94,7 +91,6 @@ class WsTransport(Transport):
   def send(self, encoded_frame):
     logger.debug("Outgoing STOMP message:\n>>> " + encoded_frame)
     if self.ws.terminated:
-      logger.info("!!!SEND ERROR")
       raise ConnectionIsAlreadyClosed("Connection is already closed cannot send data")
 
     self.ws.send(encoded_frame)
@@ -103,8 +99,7 @@ class WsTransport(Transport):
     try:
       msg = self.ws.receive()
       msg = str(msg) if msg is not None else msg
-      if not msg:
-        logger.info("Incoming STOMP message:\n<<< {0}".format(msg))
+      logger.debug("Incoming STOMP message:\n<<< {0}".format(msg))
       return msg
     except:
       # exceptions from this method are hidden by the framework so implementing logging by ourselves
@@ -112,7 +107,6 @@ class WsTransport(Transport):
     return None
 
   def stop(self):
-    logger.info("!!!WsTransport.stop()")
     self.running = False
     try:
       self.ws.terminate()
@@ -137,7 +131,6 @@ class WsConnection(BaseConnection, Protocol12):
     Protocol12.__init__(self, self.transport, (0, 0))
 
   def disconnect(self, receipt=None, headers=None, **keyword_headers):
-    logger.info("!!!WsConnection.disconnect()")
     try:
       Protocol12.disconnect(self, receipt, headers, **keyword_headers)
     except:
diff --git a/ambari-common/src/main/python/ambari_stomp/transport.py b/ambari-common/src/main/python/ambari_stomp/transport.py
index 8d85dcc..32604fc 100644
--- a/ambari-common/src/main/python/ambari_stomp/transport.py
+++ b/ambari-common/src/main/python/ambari_stomp/transport.py
@@ -326,7 +326,6 @@ class BaseTransport(ambari_stomp.listener.Publisher):
         """
         Main loop listening for incoming data.
         """
-        
         log.info("Starting receiver loop")
         try:
             while self.running:
@@ -341,12 +340,8 @@ class BaseTransport(ambari_stomp.listener.Publisher):
                             if self.__auto_decode:
                                 f.body = decode(f.body)
                             self.process_frame(f, frame)
-                            
-                    log.info("!!NOT RUNNING")
                 except exception.ConnectionClosedException:
-                    log.exception("!!except exception.ConnectionClosedException:")
                     if self.running:
-                        log.info("!!except exception.ConnectionClosedException if self.running")
                         self.notify('disconnected')
                         #
                         # Clear out any half-received messages after losing connection
@@ -354,16 +349,8 @@ class BaseTransport(ambari_stomp.listener.Publisher):
                         self.__recvbuf = b''
                         self.running = False
                     break
-                except:
-                    log.exception("!!!EXCEPTION at loop")
-                    raise
                 finally:
-                    log.info("!!!CLEANUP")
                     self.cleanup()
-            log.info("!!NOT RUNNING BIG LOOP")
-        except:
-          log.exception("!!!EXCEPTION at big loop")
-          raise
         finally:
             with self.__receiver_thread_exit_condition:
                 self.__receiver_thread_exited = True
@@ -383,13 +370,12 @@ class BaseTransport(ambari_stomp.listener.Publisher):
                 try:
                     c = self.receive()
                 except exception.InterruptedException:
-                    log.info("!!!socket read interrupted, restarting")
+                    log.debug("socket read interrupted, restarting")
                     continue
             except Exception:
-                log.info("!!!socket read error", exc_info=True)
+                log.debug("socket read error", exc_info=True)
                 c = b''
             if c is None or len(c) == 0:
-                log.error("!!ConnectionClosedException!!! {0}".format(c))
                 raise exception.ConnectionClosedException()
             if c == b'\x0a' and not self.__recvbuf and not fastbuf.tell():
                 #
@@ -590,7 +576,6 @@ class Transport(BaseTransport):
         """
         Disconnect the underlying socket connection
         """
-        log.info("!!!disconnect_socket")
         self.running = False
         if self.socket is not None:
             if self.__need_ssl():

-- 
To stop receiving notification emails like this one, please contact
"commits@ambari.apache.org" <co...@ambari.apache.org>.

[ambari] 03/03: AMBARI-22786. Fix server unit tests on branch-3.0-perf (aonishuk)

Posted by ao...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-3.0-perf
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit b6b29fd0fdcf00676f92bf8fe29d97471ce45daa
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Mon Jan 15 16:41:34 2018 +0200

    AMBARI-22786. Fix server unit tests on branch-3.0-perf (aonishuk)
---
 .../libraries/functions/conf_select.py             |   2 +-
 .../libraries/functions/stack_features.py          |   2 +-
 .../custom_actions/scripts/update_repo.py          |  11 +-
 .../src/test/python/TestResourceFilesKeeper.py     |   2 +-
 ambari-server/src/test/python/TestStackFeature.py  |  26 ++--
 ambari-server/src/test/python/TestStackSelect.py   |  16 +--
 .../test/python/custom_actions/TestCheckHost.py    |  16 +--
 .../test/python/custom_actions/TestUpdateRepo.py   |  41 +++++-
 .../configs/install_packages_config.json           | 158 +++++++++++++++++++--
 .../configs/install_packages_repository_file.json  | 158 +++++++++++++++++++--
 .../python/custom_actions/test_ru_execute_tasks.py |   4 +-
 .../test/python/custom_actions/test_ru_set_all.py  |   8 +-
 .../python/stacks/2.2/common/test_conf_select.py   |   4 +-
 .../ru_execute_tasks_namenode_prepare.json         | 158 +++++++++++++++++++--
 14 files changed, 512 insertions(+), 94 deletions(-)

diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
index 563e02f..2a8d230 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
@@ -322,7 +322,7 @@ def get_restricted_packages():
     Logger.info("No services found, there are no restrictions for conf-select")
     return package_names
 
-  stack_name = default("/hostLevelParams/stack_name", None)
+  stack_name = default("/clusterLevelParams/stack_name", None)
   if stack_name is None:
     Logger.info("The stack name is not present in the command. Restricted names skipped.")
     return package_names
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
index da4f1c0..c9de8b8 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
@@ -98,7 +98,7 @@ def get_stack_feature_version(config):
   from resource_management.libraries.functions.default import default
 
   if "clusterLevelParams" not in config or "commandParams" not in config:
-    raise Fail("Unable to determine the correct version since hostLevelParams and commandParams were not present in the configuration dictionary")
+    raise Fail("Unable to determine the correct version since clusterLevelParams and commandParams were not present in the configuration dictionary")
 
   # should always be there
   stack_version = config['clusterLevelParams']['stack_version']
diff --git a/ambari-server/src/main/resources/custom_actions/scripts/update_repo.py b/ambari-server/src/main/resources/custom_actions/scripts/update_repo.py
index 98ee91a..6f8a939 100644
--- a/ambari-server/src/main/resources/custom_actions/scripts/update_repo.py
+++ b/ambari-server/src/main/resources/custom_actions/scripts/update_repo.py
@@ -37,13 +37,12 @@ class UpdateRepo(Script):
 
 
     try:
-      repo_info_json = config['hostLevelParams']['repoInfo']
-      repo_info_dict = json.loads(repo_info_json)
+      repo_info = config['repositoryFile']
 
-      for item in repo_info_dict["repositories"]:
-        base_url = item["base_url"]
-        repo_name = item["repo_name"]
-        repo_id = item["repo_id"]
+      for item in repo_info["repositories"]:
+        base_url = item["baseUrl"]
+        repo_name = item["repoName"]
+        repo_id = item["repoId"]
         distribution = item["distribution"] if "distribution" in item else None
         components = item["components"] if "components" in item else None
 
diff --git a/ambari-server/src/test/python/TestResourceFilesKeeper.py b/ambari-server/src/test/python/TestResourceFilesKeeper.py
index d5d1287..94b7bc2 100644
--- a/ambari-server/src/test/python/TestResourceFilesKeeper.py
+++ b/ambari-server/src/test/python/TestResourceFilesKeeper.py
@@ -59,7 +59,7 @@ class TestResourceFilesKeeper(TestCase):
                                     ResourceFilesKeeper.PACKAGE_DIR)
 
   if get_platform() != PLATFORM_WINDOWS:
-    DUMMY_UNCHANGEABLE_PACKAGE_HASH="11c9ed5f7987b41ce5d7adaedd6dd08c9cc9b418"
+    DUMMY_UNCHANGEABLE_PACKAGE_HASH="ad9dc916d5b113b4763b37b119d8237d72c9c5e5"
   else:
     DUMMY_UNCHANGEABLE_PACKAGE_HASH="2e438f4f9862420ed8930a56b8809b8aca359e87"
   DUMMY_HASH="dummy_hash"
diff --git a/ambari-server/src/test/python/TestStackFeature.py b/ambari-server/src/test/python/TestStackFeature.py
index ddd3f72..b61dbf7 100644
--- a/ambari-server/src/test/python/TestStackFeature.py
+++ b/ambari-server/src/test/python/TestStackFeature.py
@@ -34,22 +34,22 @@ class TestStackFeature(TestCase):
   """
   EU Upgrade (HDP 2.5 to HDP 2.6)
     - STOP
-      hostLevelParams/stack_name = HDP
-      hostLevelParams/stack_version = 2.5
+      clusterLevelParams/stack_name = HDP
+      clusterLevelParams/stack_version = 2.5
       commandParams/version = 2.5.0.0-1237
     - START
-      hostLevelParams/stack_name = HDP
-      hostLevelParams/stack_version = 2.6
+      clusterLevelParams/stack_name = HDP
+      clusterLevelParams/stack_version = 2.6
       commandParams/version = 2.6.0.0-334
 
   EU Downgrade (HDP 2.6 to HDP 2.5)
     - STOP
-    hostLevelParams/stack_name = HDP
-    hostLevelParams/stack_version = 2.6
+    clusterLevelParams/stack_name = HDP
+    clusterLevelParams/stack_version = 2.6
     commandParams/version = 2.6.0.0-334
     - START
-    hostLevelParams/stack_name = HDP
-    hostLevelParams/stack_version = 2.5
+    clusterLevelParams/stack_name = HDP
+    clusterLevelParams/stack_version = 2.5
     commandParams/version = 2.5.0.0-1237
   """
 
@@ -151,7 +151,7 @@ class TestStackFeature(TestCase):
     return {
       "serviceName":"HDFS",
       "roleCommand": "ACTIONEXECUTE",
-      "hostLevelParams": {
+      "clusterLevelParams": {
         "stack_name": "HDP",
         "stack_version": "2.4",
       },
@@ -171,7 +171,7 @@ class TestStackFeature(TestCase):
     return {
       "serviceName":"HDFS",
       "roleCommand":"ACTIONEXECUTE",
-      "hostLevelParams": {
+      "clusterLevelParams": {
         "stack_name": "HDP",
         "stack_version": "2.4",
       },
@@ -208,7 +208,7 @@ class TestStackFeature(TestCase):
     return {
       "serviceName":"HDFS",
       "roleCommand":"ACTIONEXECUTE",
-      "hostLevelParams":{
+      "clusterLevelParams":{
         "stack_name":"HDP",
         "stack_version":"2.4"
       },
@@ -246,7 +246,7 @@ class TestStackFeature(TestCase):
     return {
       "serviceName":"HDFS",
       "roleCommand":"STOP",
-      "hostLevelParams":{
+      "clusterLevelParams":{
         "stack_name":"HDP",
         "stack_version":"2.5",
       },
@@ -283,7 +283,7 @@ class TestStackFeature(TestCase):
     return {
       "serviceName":"HDFS",
       "roleCommand":"CUSTOM_COMMAND",
-      "hostLevelParams":{
+      "clusterLevelParams":{
         "stack_name":"HDP",
         "stack_version":"2.5",
         "custom_command":"STOP"
diff --git a/ambari-server/src/test/python/TestStackSelect.py b/ambari-server/src/test/python/TestStackSelect.py
index 8cd8f2f..9e87a22 100644
--- a/ambari-server/src/test/python/TestStackSelect.py
+++ b/ambari-server/src/test/python/TestStackSelect.py
@@ -59,9 +59,9 @@ class TestStackSelect(TestCase):
 
     Script.config = dict()
     Script.config.update(command_json)
-    Script.config.update( { "configurations" : { "cluster-env" : {} }, "hostLevelParams": {} } )
+    Script.config.update( { "configurations" : { "cluster-env" : {} }, "clusterLevelParams": {} } )
     Script.config["configurations"]["cluster-env"]["stack_packages"] = self._get_stack_packages()
-    Script.config["hostLevelParams"] = { "stack_name" : "HDP" }
+    Script.config["clusterLevelParams"] = { "stack_name" : "HDP" }
 
     stack_select.select_packages(version)
 
@@ -85,9 +85,9 @@ class TestStackSelect(TestCase):
 
     Script.config = dict()
     Script.config.update(command_json)
-    Script.config.update( { "configurations" : { "cluster-env" : {} }, "hostLevelParams": {} } )
+    Script.config.update( { "configurations" : { "cluster-env" : {} }, "clusterLevelParams": {} } )
     Script.config["configurations"]["cluster-env"]["stack_packages"] = self._get_stack_packages()
-    Script.config["hostLevelParams"] = { "stack_name" : "HDP" }
+    Script.config["clusterLevelParams"] = { "stack_name" : "HDP" }
 
     stack_select.select_packages(version)
 
@@ -119,9 +119,9 @@ class TestStackSelect(TestCase):
 
     Script.config = dict()
     Script.config.update(command_json)
-    Script.config.update( { "configurations" : { "cluster-env" : {} }, "hostLevelParams": {} } )
+    Script.config.update( { "configurations" : { "cluster-env" : {} }, "clusterLevelParams": {} } )
     Script.config["configurations"]["cluster-env"]["stack_packages"] = self._get_stack_packages_with_legacy()
-    Script.config["hostLevelParams"] = { "stack_name" : "HDP" }
+    Script.config["clusterLevelParams"] = { "stack_name" : "HDP" }
 
     stack_select.select_packages(version)
 
@@ -136,7 +136,7 @@ class TestStackSelect(TestCase):
     """
     return {
       "roleCommand":"ACTIONEXECUTE",
-      "hostLevelParams": {
+      "clusterLevelParams": {
         "stack_name": "HDP",
         "stack_version": "2.4",
       },
@@ -174,7 +174,7 @@ class TestStackSelect(TestCase):
       "roleCommand":"ACTIONEXECUTE",
       "serviceName": "FOO_SERVICE",
       "role": "FOO_MASTER",
-      "hostLevelParams": {
+      "clusterLevelParams": {
         "stack_name": "HDP",
         "stack_version": "2.4",
       },
diff --git a/ambari-server/src/test/python/custom_actions/TestCheckHost.py b/ambari-server/src/test/python/custom_actions/TestCheckHost.py
index 9303d5d..7a9e8b8 100644
--- a/ambari-server/src/test/python/custom_actions/TestCheckHost.py
+++ b/ambari-server/src/test/python/custom_actions/TestCheckHost.py
@@ -88,8 +88,8 @@ class TestCheckHost(TestCase):
                                                    "user_name" : "test_user_name",
                                                    "user_passwd" : "test_user_passwd",
                                                    "jdk_name" : "test_jdk_name"},
-                                "hostLevelParams": { "agentCacheDir": "/nonexistent_tmp",
-                                                     "custom_mysql_jdbc_name" : "mysql-connector-java.jar"}
+                                "ambariLevelParams": {"custom_mysql_jdbc_name" : "mysql-connector-java.jar"},
+                                "agentLevelParams":{"agentCacheDir": "/nonexistent_tmp"}
                                 }
     get_tmp_dir_mock.return_value = "/tmp"
     download_file_mock.side_effect = Exception("test exception")
@@ -116,8 +116,8 @@ class TestCheckHost(TestCase):
                                                    "user_name" : "test_user_name",
                                                    "user_passwd" : "test_user_passwd",
                                                    "jdk_name" : "test_jdk_name"},
-                                "hostLevelParams": { "agentCacheDir": "/nonexistent_tmp",
-                                                     "custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar"}}
+                                "agentLevelParams": { "agentCacheDir": "/nonexistent_tmp"},
+                                "ambariLevelParams": { "custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar"}}
     format_mock.reset_mock()
     download_file_mock.reset_mock()
     p = MagicMock()
@@ -146,8 +146,8 @@ class TestCheckHost(TestCase):
                                                    "user_name" : "test_user_name",
                                                    "user_passwd" : "test_user_passwd",
                                                    "jdk_name" : "test_jdk_name"},
-                                "hostLevelParams": { "agentCacheDir": "/nonexistent_tmp",
-                                                     "custom_postgres_jdbc_name" : "test-postgres-jdbc.jar"}}
+                                "agentLevelParams": { "agentCacheDir": "/nonexistent_tmp"},
+                                "ambariLevelParams": { "custom_postgres_jdbc_name" : "oracle-jdbc-driver.jar"}}
     format_mock.reset_mock()
     download_file_mock.reset_mock()
     download_file_mock.side_effect = [p, p]
@@ -184,8 +184,8 @@ class TestCheckHost(TestCase):
                                                    "user_name" : "test_user_name",
                                                    "user_passwd" : "test_user_passwd",
                                                    "db_name" : "postgres"},
-                                "hostLevelParams": { "agentCacheDir": "/nonexistent_tmp",
-                                                     "custom_postgres_jdbc_name" : "test-postgres-jdbc.jar"}}
+                                "agentLevelParams": { "agentCacheDir": "/nonexistent_tmp"},
+                                "ambariLevelParams": { "custom_postgres_jdbc_name" : "test-postgres-jdbc.jar"}}
 
     isfile_mock.return_value = False
 
diff --git a/ambari-server/src/test/python/custom_actions/TestUpdateRepo.py b/ambari-server/src/test/python/custom_actions/TestUpdateRepo.py
index f3ee5ba..f984da9 100644
--- a/ambari-server/src/test/python/custom_actions/TestUpdateRepo.py
+++ b/ambari-server/src/test/python/custom_actions/TestUpdateRepo.py
@@ -54,16 +54,45 @@ class TestUpdateRepo(TestCase):
                                                 "repo_ubuntu_template": "REPO_UBUNTU_TEMPLATE"
                                         }
                                  },
-                                 "hostLevelParams": {
-                                   "repo_info": '{"repositories":[{"base_url":"TEST_BASE_URL","repo_name":"TEST_REPO_NAME","repo_id":"TEST_REPO_ID"}]}'
-                                 }
+                                "repositoryFile": {
+                                    "resolved": True, 
+                                    "repoVersion": "2.4.3.0-227", 
+                                    "repositories": [
+                                        {
+                                            "mirrorsList": None, 
+                                            "ambariManaged": True, 
+                                            "baseUrl": "http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.4.3.0/", 
+                                            "repoName": "HDP", 
+                                            "components": None, 
+                                            "osType": "redhat6", 
+                                            "distribution": None, 
+                                            "repoId": "HDP-2.4-repo-1"
+                                        }, 
+                                        {
+                                            "mirrorsList": None, 
+                                            "ambariManaged": True, 
+                                            "baseUrl": "http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6", 
+                                            "repoName": "HDP-UTILS", 
+                                            "components": None, 
+                                            "osType": "redhat6", 
+                                            "distribution": None, 
+                                            "repoId": "HDP-UTILS-1.1.0.20-repo-1"
+                                        }
+                                    ], 
+                                    "feature": {
+                                        "m_isScoped": False, 
+                                        "m_isPreInstalled": False
+                                    }, 
+                                    "stackName": "HDP", 
+                                    "repoVersionId": 1
+                                }, 
                                }
 
     with Environment('/') as env:
       updateRepo.actionexecute(None)
 
     self.assertTrue(file_mock.called)
-    self.assertEquals(file_mock.call_args[0][0], "/etc/yum.repos.d/TEST_REPO_NAME.repo")
+    self.assertEquals(file_mock.call_args[0][0], "/etc/yum.repos.d/HDP-UTILS.repo")
     self.assertEquals(structured_out_mock.call_args[0][0], {'repo_update': {'message': 'Repository files successfully updated!', 'exit_code': 0}})
 
     ###### invalid repo info
@@ -75,9 +104,7 @@ class TestUpdateRepo(TestCase):
                                                 "repo_ubuntu_template": "REPO_UBUNTU_TEMPLATE"
                                         }
                                  },
-                                 "hostLevelParams": {
-                                   "repo_info": '{}'
-                                 }
+                                 "repositoryFile": {}
                                }
     try:
       with Environment('/') as env:
diff --git a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
index 36a7896..683eb8b 100644
--- a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
+++ b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json
@@ -4,25 +4,155 @@
     "clusterName": "cc", 
     "hostname": "0b3.vm", 
     "passiveInfo": [], 
-    "hostLevelParams": {
-        "agent_stack_retry_count": "5",
-        "agent_stack_retry_on_unavailability": "false",
-        "jdk_location": "http://0b3.vm:8080/resources/", 
-        "ambari_db_rca_password": "mapred", 
-        "java_home": "/usr/jdk64/jdk1.7.0_67",
-        "java_version": "8",
-        "ambari_db_rca_url": "jdbc:postgresql://0b3.vm/ambarirca", 
-        "jce_name": "UnlimitedJCEPolicyJDK7.zip", 
-        "oracle_jdbc_url": "http://0b3.vm:8080/resources//ojdbc6.jar", 
+    "clusterLevelParams": {
         "stack_version": "2.1", 
+        "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+        "hooks_folder": "stack-hooks", 
         "stack_name": "HDP", 
+        "group_list": "[\"hdfs\",\"hadoop\",\"users\"]", 
+        "user_groups": "{\"hive\":[\"hadoop\"], \"oozie\":[\"hadoop\",\"users\"], \"nobody\":[\"hadoop\",\"nobody\"], \"ambari-qa\":[\"hadoop\",\"users\"], \"flume\":[\"hadoop\"], \"hdfs\":[\"hadoop\"], \"storm\":[\"hadoop\"], \"mapred\":[\"hadoop\"], \"hbase\":[\"hadoop\"], \"tez\":[\"hadoop\",\"users\"], \"zookeeper\":[\"hadoop\"], \"falcon\":[\"hadoop\",\"users\"], \"sqoop\":[\"hadoop\"], \"yarn\":[\"hadoop\"], \"hcat\":[\"hadoop\"]}", 
+        "cluster_name": "c1", 
+        "user_list": "[\"ambari-qa\",\"hdfs\"]"
+    },
+    "ambariLevelParams": {
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
+        "agent_stack_retry_count": "5", 
+        "db_driver_filename": "mysql-connector-java.jar", 
+        "agent_stack_retry_on_unavailability": "false", 
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
+        "jce_name": "jce_policy-7.zip", 
+        "java_version": "7", 
+        "ambari_db_rca_password": "mapred", 
+        "host_sys_prepped": "false", 
         "db_name": "ambari", 
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org/resources//ojdbc6.jar", 
         "ambari_db_rca_driver": "org.postgresql.Driver", 
-        "jdk_name": "jdk-7u67-linux-x64.tar.gz", 
         "ambari_db_rca_username": "mapred", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "mysql_jdbc_url": "http://0b3.vm:8080/resources//mysql-connector-java.jar"
-    }, 
+        "jdk_name": "jdk-7u45-linux-x64.tar.gz", 
+        "java_home": "/usr/jdk64/jdk1.7.0_45", 
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar"
+    },
+    "repositoryFile": {
+        "resolved": true, 
+        "repoVersion": "2.6.4.0-60", 
+        "repositories": [
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-60", 
+                "repoName": "HDP", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-2.6-repo-1"
+            }, 
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-60", 
+                "repoName": "HDP-GPL", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-2.6-GPL-repo-1"
+            }, 
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6", 
+                "repoName": "HDP-UTILS", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-UTILS-1.1.0.22-repo-1"
+            }
+        ], 
+        "feature": {
+            "m_isScoped": true, 
+            "m_isPreInstalled": false
+        }, 
+        "stackName": "HDP", 
+        "repoVersionId": 1
+    },
+    "agentLevelParams": {
+        "public_hostname": "c6401.ambari.apache.org", 
+        "hostname": "c6401.ambari.apache.org", 
+        "agentConfigParams": {
+            "agent": {
+                "parallel_execution": 0, 
+                "use_system_proxy_settings": true
+            }
+        }, 
+        "agentCacheDir": "/var/lib/ambari-agent/cache"
+    },
+    "hostLevelParams": {
+        "recoveryConfig": {
+            "retryGap": "5", 
+            "windowInMinutes": "60", 
+            "maxLifetimeCount": "1024", 
+            "components": "", 
+            "maxCount": "6", 
+            "type": "AUTO_START"
+        }, 
+        "hostRepositories": {
+            "componentRepos": {
+                "NAMENODE": 1, 
+                "SECONDARY_NAMENODE": 1, 
+                "DATANODE": 1, 
+                "HDFS_CLIENT": 1
+            }, 
+            "commandRepos": {
+                "1": {
+                    "resolved": true, 
+                    "repoVersion": "2.1.4.0-60", 
+                    "repositories": [
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-60", 
+                            "repoName": "HDP", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-2.6-repo-1"
+                        }, 
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-60", 
+                            "repoName": "HDP-GPL", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-2.6-GPL-repo-1"
+                        }, 
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6", 
+                            "repoName": "HDP-UTILS", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-UTILS-1.1.0.22-repo-1"
+                        }
+                    ], 
+                    "feature": {
+                        "m_isScoped": true, 
+                        "m_isPreInstalled": false
+                    }, 
+                    "stackName": "HDP", 
+                    "repoVersionId": 1
+                }
+            }
+        }
+    },
+    "serviceLevelParams": {
+        "credentialStoreEnabled": false, 
+        "status_commands_timeout": 300, 
+        "version": "2.7.3", 
+        "service_package_folder": "common-services/HDFS/2.1.0.2.0/package"
+    },
     "commandType": "EXECUTION_COMMAND", 
     "roleParams": {
         "stack_id": "HDP-2.2",
diff --git a/ambari-server/src/test/python/custom_actions/configs/install_packages_repository_file.json b/ambari-server/src/test/python/custom_actions/configs/install_packages_repository_file.json
index bdf062c..a30119e 100644
--- a/ambari-server/src/test/python/custom_actions/configs/install_packages_repository_file.json
+++ b/ambari-server/src/test/python/custom_actions/configs/install_packages_repository_file.json
@@ -4,25 +4,155 @@
     "clusterName": "cc", 
     "hostname": "0b3.vm", 
     "passiveInfo": [], 
-    "hostLevelParams": {
-        "agent_stack_retry_count": "5",
-        "agent_stack_retry_on_unavailability": "false",
-        "jdk_location": "http://0b3.vm:8080/resources/", 
-        "ambari_db_rca_password": "mapred", 
-        "java_home": "/usr/jdk64/jdk1.7.0_67",
-        "java_version": "8",
-        "ambari_db_rca_url": "jdbc:postgresql://0b3.vm/ambarirca", 
-        "jce_name": "UnlimitedJCEPolicyJDK7.zip", 
-        "oracle_jdbc_url": "http://0b3.vm:8080/resources//ojdbc6.jar", 
+    "clusterLevelParams": {
         "stack_version": "2.1", 
+        "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+        "hooks_folder": "stack-hooks", 
         "stack_name": "HDP", 
+        "group_list": "[\"hdfs\",\"hadoop\",\"users\"]", 
+        "user_groups": "{\"hive\":[\"hadoop\"], \"oozie\":[\"hadoop\",\"users\"], \"nobody\":[\"hadoop\",\"nobody\"], \"ambari-qa\":[\"hadoop\",\"users\"], \"flume\":[\"hadoop\"], \"hdfs\":[\"hadoop\"], \"storm\":[\"hadoop\"], \"mapred\":[\"hadoop\"], \"hbase\":[\"hadoop\"], \"tez\":[\"hadoop\",\"users\"], \"zookeeper\":[\"hadoop\"], \"falcon\":[\"hadoop\",\"users\"], \"sqoop\":[\"hadoop\"], \"yarn\":[\"hadoop\"], \"hcat\":[\"hadoop\"]}", 
+        "cluster_name": "c1", 
+        "user_list": "[\"ambari-qa\",\"hdfs\"]"
+    },
+    "ambariLevelParams": {
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
+        "agent_stack_retry_count": "5", 
+        "db_driver_filename": "mysql-connector-java.jar", 
+        "agent_stack_retry_on_unavailability": "false", 
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
+        "jce_name": "jce_policy-7.zip", 
+        "java_version": "7", 
+        "ambari_db_rca_password": "mapred", 
+        "host_sys_prepped": "false", 
         "db_name": "ambari", 
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org/resources//ojdbc6.jar", 
         "ambari_db_rca_driver": "org.postgresql.Driver", 
-        "jdk_name": "jdk-7u67-linux-x64.tar.gz", 
         "ambari_db_rca_username": "mapred", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "mysql_jdbc_url": "http://0b3.vm:8080/resources//mysql-connector-java.jar"
-    }, 
+        "jdk_name": "jdk-7u45-linux-x64.tar.gz", 
+        "java_home": "/usr/jdk64/jdk1.7.0_45", 
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar"
+    },
+    "repositoryFile": {
+        "resolved": true, 
+        "repoVersion": "2.6.4.0-60", 
+        "repositories": [
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-60", 
+                "repoName": "HDP", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-2.6-repo-1"
+            }, 
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-60", 
+                "repoName": "HDP-GPL", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-2.6-GPL-repo-1"
+            }, 
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6", 
+                "repoName": "HDP-UTILS", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-UTILS-1.1.0.22-repo-1"
+            }
+        ], 
+        "feature": {
+            "m_isScoped": true, 
+            "m_isPreInstalled": false
+        }, 
+        "stackName": "HDP", 
+        "repoVersionId": 1
+    },
+    "agentLevelParams": {
+        "public_hostname": "c6401.ambari.apache.org", 
+        "hostname": "c6401.ambari.apache.org", 
+        "agentConfigParams": {
+            "agent": {
+                "parallel_execution": 0, 
+                "use_system_proxy_settings": true
+            }
+        }, 
+        "agentCacheDir": "/var/lib/ambari-agent/cache"
+    },
+    "hostLevelParams": {
+        "recoveryConfig": {
+            "retryGap": "5", 
+            "windowInMinutes": "60", 
+            "maxLifetimeCount": "1024", 
+            "components": "", 
+            "maxCount": "6", 
+            "type": "AUTO_START"
+        }, 
+        "hostRepositories": {
+            "componentRepos": {
+                "NAMENODE": 1, 
+                "SECONDARY_NAMENODE": 1, 
+                "DATANODE": 1, 
+                "HDFS_CLIENT": 1
+            }, 
+            "commandRepos": {
+                "1": {
+                    "resolved": true, 
+                    "repoVersion": "2.1.4.0-60", 
+                    "repositories": [
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-60", 
+                            "repoName": "HDP", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-2.6-repo-1"
+                        }, 
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-60", 
+                            "repoName": "HDP-GPL", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-2.6-GPL-repo-1"
+                        }, 
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6", 
+                            "repoName": "HDP-UTILS", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-UTILS-1.1.0.22-repo-1"
+                        }
+                    ], 
+                    "feature": {
+                        "m_isScoped": true, 
+                        "m_isPreInstalled": false
+                    }, 
+                    "stackName": "HDP", 
+                    "repoVersionId": 1
+                }
+            }
+        }
+    },
+    "serviceLevelParams": {
+        "credentialStoreEnabled": false, 
+        "status_commands_timeout": 300, 
+        "version": "2.7.3", 
+        "service_package_folder": "common-services/HDFS/2.1.0.2.0/package"
+    },
     "commandType": "EXECUTION_COMMAND", 
     "repositoryFile": {
         "stackName": "HDP",
diff --git a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
index 1d822eb..f77a95b 100644
--- a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
+++ b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
@@ -117,7 +117,7 @@ class TestRUExecuteTasks(RMFTestCase):
 
     # Ensure that the json file was actually read.
     stack_name = default("/clusterLevelParams/stack_name", None)
-    stack_version = default("/hostLevelParams/stack_version", None)
+    stack_version = default("/clusterLevelParams/stack_version", None)
     service_package_folder = default('/roleParams/service_package_folder', None)
 
     self.assertEqual(stack_name, "HDP")
@@ -165,7 +165,7 @@ class TestRUExecuteTasks(RMFTestCase):
 
     # Ensure that the json file was actually read.
     stack_name = default("/clusterLevelParams/stack_name", None)
-    stack_version = default("/hostLevelParams/stack_version", None)
+    stack_version = default("/clusterLevelParams/stack_version", None)
     service_package_folder = default('/commandParams/service_package_folder', None)
 
     self.assertEqual(stack_name, "HDP")
diff --git a/ambari-server/src/test/python/custom_actions/test_ru_set_all.py b/ambari-server/src/test/python/custom_actions/test_ru_set_all.py
index 400af49..6421397 100644
--- a/ambari-server/src/test/python/custom_actions/test_ru_set_all.py
+++ b/ambari-server/src/test/python/custom_actions/test_ru_set_all.py
@@ -90,7 +90,7 @@ class TestRUSetAll(RMFTestCase):
 
     # Ensure that the json file was actually read.
     stack_name = default("/clusterLevelParams/stack_name", None)
-    stack_version = default("/hostLevelParams/stack_version", None)
+    stack_version = default("/clusterLevelParams/stack_version", None)
     service_package_folder = default('/roleParams/service_package_folder', None)
 
     self.assertEqual(stack_name, "HDP")
@@ -115,7 +115,7 @@ class TestRUSetAll(RMFTestCase):
     with open(json_file_path, "r") as json_file:
       json_payload = json.load(json_file)
 
-    json_payload['hostLevelParams']['stack_name'] = "HDP"
+    json_payload['clusterLevelParams']['stack_name'] = "HDP"
     json_payload['clusterLevelParams']['stack_version'] = "2.3"
     json_payload['commandParams']['version'] = "2.3.0.0-1234"
     json_payload["configurations"]["cluster-env"]["stack_tools"] = self.get_stack_tools()
@@ -131,7 +131,7 @@ class TestRUSetAll(RMFTestCase):
 
     # Ensure that the json file was actually read.
     stack_name = default("/clusterLevelParams/stack_name", None)
-    stack_version = default("/hostLevelParams/stack_version", None)
+    stack_version = default("/clusterLevelParams/stack_version", None)
     service_package_folder = default('/roleParams/service_package_folder', None)
 
     self.assertEqual(stack_name, "HDP")
@@ -182,7 +182,7 @@ class TestRUSetAll(RMFTestCase):
 
     # Ensure that the json file was actually read.
     stack_name = default("/clusterLevelParams/stack_name", None)
-    stack_version = default("/hostLevelParams/stack_version", None)
+    stack_version = default("/clusterLevelParams/stack_version", None)
     service_package_folder = default('/roleParams/service_package_folder', None)
 
     self.assertEqual(stack_name, "HDP")
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_conf_select.py b/ambari-server/src/test/python/stacks/2.2/common/test_conf_select.py
index a199d00..a893d75 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_conf_select.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_conf_select.py
@@ -35,9 +35,9 @@ class TestConfSelect(RMFTestCase):
     self.env.__enter__()
 
     Script.config = dict()
-    Script.config.update( { "configurations" : { "cluster-env" : {} }, "hostLevelParams": {} } )
+    Script.config.update( { "configurations" : { "cluster-env" : {} }, "clusterLevelParams": {} } )
     Script.config["configurations"]["cluster-env"]["stack_packages"] = RMFTestCase.get_stack_packages()
-    Script.config["hostLevelParams"] = { "stack_name" : "HDP" }
+    Script.config["clusterLevelParams"] = { "stack_name" : "HDP" }
 
 
   def tearDown(self):
diff --git a/ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json b/ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json
index 27c09b5..ef85a34 100644
--- a/ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json
+++ b/ambari-server/src/test/resources/custom_actions/ru_execute_tasks_namenode_prepare.json
@@ -5,23 +5,155 @@
     "clusterName": "c1", 
     "componentName": "", 
     "hostname": "u1202.ambari.apache.org", 
-    "hostLevelParams": {
-        "jdk_location": "http://u1201.ambari.apache.org:8080/resources/", 
-        "ambari_db_rca_password": "mapred", 
-        "java_home": "/usr/jdk64/jdk1.7.0_67", 
-        "ambari_db_rca_url": "jdbc:postgresql://u1201.ambari.apache.org/ambarirca", 
-        "jce_name": "UnlimitedJCEPolicyJDK7.zip", 
-        "oracle_jdbc_url": "http://u1201.ambari.apache.org:8080/resources//ojdbc6.jar", 
+    "clusterLevelParams": {
         "stack_version": "2.2", 
+        "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+        "hooks_folder": "stack-hooks", 
         "stack_name": "HDP", 
+        "group_list": "[\"hdfs\",\"hadoop\",\"users\"]", 
+        "user_groups": "{\"hive\":[\"hadoop\"], \"oozie\":[\"hadoop\",\"users\"], \"nobody\":[\"hadoop\",\"nobody\"], \"ambari-qa\":[\"hadoop\",\"users\"], \"flume\":[\"hadoop\"], \"hdfs\":[\"hadoop\"], \"storm\":[\"hadoop\"], \"mapred\":[\"hadoop\"], \"hbase\":[\"hadoop\"], \"tez\":[\"hadoop\",\"users\"], \"zookeeper\":[\"hadoop\"], \"falcon\":[\"hadoop\",\"users\"], \"sqoop\":[\"hadoop\"], \"yarn\":[\"hadoop\"], \"hcat\":[\"hadoop\"]}", 
+        "cluster_name": "c1", 
+        "user_list": "[\"ambari-qa\",\"hdfs\"]"
+    },
+    "ambariLevelParams": {
+        "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
+        "agent_stack_retry_count": "5", 
+        "db_driver_filename": "mysql-connector-java.jar", 
+        "agent_stack_retry_on_unavailability": "false", 
+        "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca", 
+        "jce_name": "jce_policy-7.zip", 
+        "java_version": "7", 
+        "ambari_db_rca_password": "mapred", 
+        "host_sys_prepped": "false", 
         "db_name": "ambari", 
+        "oracle_jdbc_url": "http://c6401.ambari.apache.org/resources//ojdbc6.jar", 
         "ambari_db_rca_driver": "org.postgresql.Driver", 
-        "jdk_name": "jdk-7u67-linux-x64.tar.gz", 
         "ambari_db_rca_username": "mapred", 
-        "db_driver_filename": "mysql-connector-java.jar", 
-        "agentCacheDir": "/var/lib/ambari-agent/cache", 
-        "mysql_jdbc_url": "http://u1201.ambari.apache.org:8080/resources//mysql-connector-java.jar"
-    }, 
+        "jdk_name": "jdk-7u45-linux-x64.tar.gz", 
+        "java_home": "/usr/jdk64/jdk1.7.0_45", 
+        "mysql_jdbc_url": "http://c6401.ambari.apache.org/resources//mysql-connector-java.jar"
+    },
+    "repositoryFile": {
+        "resolved": true, 
+        "repoVersion": "2.6.4.0-60", 
+        "repositories": [
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-60", 
+                "repoName": "HDP", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-2.6-repo-1"
+            }, 
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-60", 
+                "repoName": "HDP-GPL", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-2.6-GPL-repo-1"
+            }, 
+            {
+                "mirrorsList": null, 
+                "ambariManaged": true, 
+                "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6", 
+                "repoName": "HDP-UTILS", 
+                "components": null, 
+                "osType": "redhat6", 
+                "distribution": null, 
+                "repoId": "HDP-UTILS-1.1.0.22-repo-1"
+            }
+        ], 
+        "feature": {
+            "m_isScoped": true, 
+            "m_isPreInstalled": false
+        }, 
+        "stackName": "HDP", 
+        "repoVersionId": 1
+    },
+    "agentLevelParams": {
+        "public_hostname": "c6401.ambari.apache.org", 
+        "hostname": "c6401.ambari.apache.org", 
+        "agentConfigParams": {
+            "agent": {
+                "parallel_execution": 0, 
+                "use_system_proxy_settings": true
+            }
+        }, 
+        "agentCacheDir": "/var/lib/ambari-agent/cache"
+    },
+    "hostLevelParams": {
+        "recoveryConfig": {
+            "retryGap": "5", 
+            "windowInMinutes": "60", 
+            "maxLifetimeCount": "1024", 
+            "components": "", 
+            "maxCount": "6", 
+            "type": "AUTO_START"
+        }, 
+        "hostRepositories": {
+            "componentRepos": {
+                "NAMENODE": 1, 
+                "SECONDARY_NAMENODE": 1, 
+                "DATANODE": 1, 
+                "HDFS_CLIENT": 1
+            }, 
+            "commandRepos": {
+                "1": {
+                    "resolved": true, 
+                    "repoVersion": "2.1.4.0-60", 
+                    "repositories": [
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-60", 
+                            "repoName": "HDP", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-2.6-repo-1"
+                        }, 
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-60", 
+                            "repoName": "HDP-GPL", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-2.6-GPL-repo-1"
+                        }, 
+                        {
+                            "mirrorsList": null, 
+                            "ambariManaged": true, 
+                            "baseUrl": "http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6", 
+                            "repoName": "HDP-UTILS", 
+                            "components": null, 
+                            "osType": "redhat6", 
+                            "distribution": null, 
+                            "repoId": "HDP-UTILS-1.1.0.22-repo-1"
+                        }
+                    ], 
+                    "feature": {
+                        "m_isScoped": true, 
+                        "m_isPreInstalled": false
+                    }, 
+                    "stackName": "HDP", 
+                    "repoVersionId": 1
+                }
+            }
+        }
+    },
+    "serviceLevelParams": {
+        "credentialStoreEnabled": false, 
+        "status_commands_timeout": 300, 
+        "version": "2.7.3", 
+        "service_package_folder": "common-services/HDFS/2.1.0.2.0/package"
+    },
     "commandType": "EXECUTION_COMMAND", 
     "roleParams": {
         "version": "2.2.1.0-2260", 
@@ -247,4 +379,4 @@
             "u1203.ambari.apache.org"
         ]
     }
-}
\ No newline at end of file
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@ambari.apache.org" <co...@ambari.apache.org>.