ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [1/3] ambari git commit: AMBARI-18682 - ZooKeeper Is Invoking hdp-/conf-select Outside Of Upgrades (jonathanhurley)
Date Wed, 09 Nov 2016 21:55:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2a0c9414b -> f052c2ab8


AMBARI-18682 - ZooKeeper Is Invoking hdp-/conf-select Outside Of Upgrades (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 5fc8a0e89b3e668950431412aa0afe4cd93f27b1
Parents: 4689179
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Wed Nov 9 12:45:27 2016 -0500
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Wed Nov 9 16:05:53 2016 -0500

----------------------------------------------------------------------
 .../src/main/python/ambari_commons/constants.py |  1 +
 .../libraries/functions/conf_select.py          |  2 +-
 .../libraries/script/script.py                  | 34 ++++++++++------
 .../internal/UpgradeResourceProvider.java       | 20 ++++------
 .../4.0.0.2.0/package/scripts/oozie_server.py   |  6 +--
 .../RANGER/0.4.0/package/scripts/params.py      |  2 +-
 .../0.4.0/package/scripts/setup_ranger_xml.py   |  7 ++--
 .../3.4.5/package/scripts/zookeeper.py          |  8 ----
 .../3.4.5/package/scripts/zookeeper_server.py   |  4 +-
 .../3.4.5/package/scripts/zookeeper_service.py  | 11 -----
 .../2.0.6/hooks/before-ANY/scripts/params.py    |  4 +-
 .../stacks/2.0.6/configs/client-upgrade.json    |  2 +-
 .../test/python/stacks/2.0.6/configs/nn_eu.json |  2 +-
 .../stacks/2.0.6/configs/nn_eu_standby.json     |  2 +-
 .../python/stacks/2.0.6/configs/nn_ru_lzo.json  |  2 +-
 .../stacks/2.1/configs/client-upgrade.json      |  2 +-
 .../2.1/configs/hive-metastore-upgrade.json     |  2 +-
 .../stacks/2.2/configs/falcon-upgrade.json      |  2 +-
 .../python/stacks/2.2/configs/hive-upgrade.json |  2 +-
 .../journalnode-upgrade-hdfs-secure.json        |  2 +-
 .../stacks/2.2/configs/journalnode-upgrade.json |  2 +-
 .../python/stacks/2.2/configs/knox_upgrade.json |  2 +-
 .../stacks/2.2/configs/oozie-downgrade.json     |  2 +-
 .../stacks/2.2/configs/oozie-upgrade.json       |  2 +-
 .../2.2/configs/ranger-admin-upgrade.json       |  2 +-
 .../2.2/configs/ranger-usersync-upgrade.json    |  2 +-
 .../app/assets/data/stack_versions/upgrade.json | 42 ++++++++++----------
 .../HDF/2.0/hooks/before-ANY/scripts/params.py  |  4 +-
 28 files changed, 79 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-common/src/main/python/ambari_commons/constants.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/constants.py b/ambari-common/src/main/python/ambari_commons/constants.py
index 779b204..b59ad53 100644
--- a/ambari-common/src/main/python/ambari_commons/constants.py
+++ b/ambari-common/src/main/python/ambari_commons/constants.py
@@ -22,6 +22,7 @@ AMBARI_SUDO_BINARY = "ambari-sudo.sh"
 
 UPGRADE_TYPE_ROLLING = "rolling"
 UPGRADE_TYPE_NON_ROLLING = "nonrolling"
+UPGRADE_TYPE_HOST_ORDERED = "host_ordered"
 
 
 class SERVICE:

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
----------------------------------------------------------------------
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 8d54053..ce00f0c 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
@@ -407,7 +407,7 @@ def get_hadoop_conf_dir(force_latest_on_upgrade=False):
       stack_name = default("/hostLevelParams/stack_name", None)
       version = default("/commandParams/version", None)
 
-      if stack_name and version:
+      if not os.path.islink(hadoop_conf_dir) and stack_name and version:
         version = str(version)
         allow_setting_conf_select_symlink = True
   else:

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
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 6e567d2..f8df842 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
@@ -31,7 +31,9 @@ import tarfile
 from optparse import OptionParser
 import resource_management
 from ambari_commons import OSCheck, OSConst
-from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING
+from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING
+from ambari_commons.constants import UPGRADE_TYPE_ROLLING
+from ambari_commons.constants import UPGRADE_TYPE_HOST_ORDERED
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from resource_management.libraries.resources import XmlConfig
 from resource_management.libraries.resources import PropertiesFile
@@ -669,25 +671,20 @@ class Script(object):
     except KeyError:
       pass
 
-    restart_type = ""
+    upgrade_type_command_param = ""
     direction = None
     if config is not None:
       command_params = config["commandParams"] if "commandParams" in config else None
       if command_params is not None:
-        restart_type = command_params["restart_type"] if "restart_type" in command_params else ""
+        upgrade_type_command_param = command_params["upgrade_type"] if "upgrade_type" in command_params else ""
         direction = command_params["upgrade_direction"] if "upgrade_direction" in command_params else None
 
-    upgrade_type = None
-    if restart_type.lower() == "rolling_upgrade":
-      upgrade_type = UPGRADE_TYPE_ROLLING
-    elif restart_type.lower() == "nonrolling_upgrade":
-      upgrade_type = UPGRADE_TYPE_NON_ROLLING
-
+    upgrade_type = Script.get_upgrade_type(upgrade_type_command_param)
     is_stack_upgrade = upgrade_type is not None
 
     # need this before actually executing so that failures still report upgrade info
     if is_stack_upgrade:
-      upgrade_info = {"upgrade_type": restart_type}
+      upgrade_info = {"upgrade_type": upgrade_type_command_param}
       if direction is not None:
         upgrade_info["direction"] = direction.upper()
 
@@ -710,7 +707,7 @@ class Script(object):
         self.stop(env, upgrade_type=upgrade_type)
       else:
         if is_stack_upgrade:
-          self.stop(env, rolling_restart=(restart_type == "rolling_upgrade"))
+          self.stop(env, rolling_restart=(upgrade_type == UPGRADE_TYPE_ROLLING))
         else:
           self.stop(env)
 
@@ -745,7 +742,7 @@ class Script(object):
         self.start(env, upgrade_type=upgrade_type)
       else:
         if is_stack_upgrade:
-          self.start(env, rolling_restart=(restart_type == "rolling_upgrade"))
+          self.start(env, rolling_restart=(upgrade_type == UPGRADE_TYPE_ROLLING))
         else:
           self.start(env)
       self.post_start()
@@ -869,6 +866,19 @@ class Script(object):
       Script.instance = Script()
     return Script.instance
 
+  @staticmethod
+  def get_upgrade_type(upgrade_type_command_param):
+    upgrade_type = None
+    if upgrade_type_command_param.lower() == "rolling_upgrade":
+      upgrade_type = UPGRADE_TYPE_ROLLING
+    elif upgrade_type_command_param.lower() == "nonrolling_upgrade":
+      upgrade_type = UPGRADE_TYPE_NON_ROLLING
+    elif upgrade_type_command_param.lower() == "host_ordered_upgrade":
+      upgrade_type = UPGRADE_TYPE_HOST_ORDERED
+
+    return upgrade_type
+
+
   def __init__(self):
     if Script.instance is not None:
       raise Fail("An instantiation already exists! Use, get_instance() method.")

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 02c05d9..1713b64 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -224,9 +224,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
   private static final String COMMAND_PARAM_UPGRADE_PACK = "upgrade_pack";
   private static final String COMMAND_PARAM_REQUEST_ID = "request_id";
 
-  // TODO AMBARI-12698, change this variable name since it is no longer always a restart. Possible values are rolling_upgrade or nonrolling_upgrade
-  // This will involve changing Script.py
-  private static final String COMMAND_PARAM_RESTART_TYPE = "restart_type";
+  private static final String COMMAND_PARAM_UPGRADE_TYPE = "upgrade_type";
   private static final String COMMAND_PARAM_TASKS = "tasks";
   private static final String COMMAND_PARAM_STRUCT_OUT = "structured_out";
   private static final String COMMAND_DOWNGRADE_FROM_VERSION = "downgrade_from_version";
@@ -288,6 +286,9 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
   @Inject
   private static Configuration s_configuration;
 
+  @Inject
+  private static Gson s_gson;
+
   static {
     // properties
     PROPERTY_IDS.add(UPGRADE_CLUSTER_NAME);
@@ -1400,13 +1401,9 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
     }
 
     Map<String, String> commandParams = getNewParameterMap(request);
-
-    // TODO AMBARI-12698, change COMMAND_PARAM_RESTART_TYPE to something that isn't "RESTART" specific.
-    if (context.getType() == UpgradeType.ROLLING) {
-      commandParams.put(COMMAND_PARAM_RESTART_TYPE, "rolling_upgrade");
-    }
-    if (context.getType() == UpgradeType.NON_ROLLING) {
-      commandParams.put(COMMAND_PARAM_RESTART_TYPE, "nonrolling_upgrade");
+    if (null != context.getType()) {
+      // use the serialized attributes of the enum to convert it to a string
+      commandParams.put(COMMAND_PARAM_UPGRADE_TYPE, s_gson.toJson(context.getType()));
     }
 
     commandParams.put(COMMAND_PARAM_VERSION, context.getVersion());
@@ -2060,10 +2057,9 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
       }
 
       if (!failedResources.isEmpty()) {
-        Gson gson = new Gson();
         throw new AmbariException(
             String.format("Unable to perform %s. Prerequisite checks failed %s",
-                direction.getText(false), gson.toJson(failedResources)));
+                direction.getText(false), s_gson.toJson(failedResources)));
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
index 02eb192..e0778da 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
@@ -57,11 +57,7 @@ class OozieServer(Script):
 
     # The configure command doesn't actually receive the upgrade_type from Script.py, so get it from the config dictionary
     if upgrade_type is None:
-      restart_type = default("/commandParams/restart_type", "")
-      if restart_type.lower() == "rolling_upgrade":
-        upgrade_type = UPGRADE_TYPE_ROLLING
-      elif restart_type.lower() == "nonrolling_upgrade":
-        upgrade_type = UPGRADE_TYPE_NON_ROLLING
+      upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
 
     if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and params.version is not None:
       Logger.info(format("Configuring Oozie during upgrade type: {upgrade_type}, direction: {params.upgrade_direction}, and version {params.version}"))

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 5b0dcea..6debaf1 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -365,7 +365,7 @@ if stack_supports_ranger_kerberos and not has_namenode:
     core_site_auth_to_local_property = core_site_auth_to_local_property + 'DEFAULT'
     core_site_property['hadoop.security.auth_to_local'] = core_site_auth_to_local_property
 
-restart_type = default("/commandParams/restart_type", "")
+upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
 
 # ranger service pid
 user_group = config['configurations']['cluster-env']['user_group']

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 4e402e5..6462495 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -19,6 +19,8 @@ limitations under the License.
 """
 import os
 import re
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.default import default
 from resource_management.core.logger import Logger
 from resource_management.core.resources.system import File, Directory, Execute, Link
 from resource_management.core.source import DownloadSource, InlineTemplate, Template
@@ -54,10 +56,7 @@ def setup_ranger_admin(upgrade_type=None):
   import params
 
   if upgrade_type is None:
-    if params.restart_type.lower() == "rolling_upgrade":
-      upgrade_type = UPGRADE_TYPE_ROLLING
-    elif params.restart_type.lower() == "nonrolling_upgrade":
-      upgrade_type = UPGRADE_TYPE_NON_ROLLING
+    upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
 
   ranger_home = params.ranger_home
   ranger_conf = params.ranger_conf

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper.py
index a04d393..6572479 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper.py
@@ -36,14 +36,6 @@ from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 def zookeeper(type = None, upgrade_type=None):
   import params
 
-  if type == 'server':
-    # This path may be missing after Ambari upgrade. We need to create it. We need to do this before any configs will
-    # be applied.
-    if upgrade_type is None and not os.path.exists(os.path.join(params.stack_root,"/current/zookeeper-server")) and params.current_version\
-      and check_stack_feature(StackFeature.ROLLING_UPGRADE, format_stack_version(params.version)):
-      conf_select.select(params.stack_name, "zookeeper", params.current_version)
-      stack_select.select("zookeeper-server", params.version)
-
   Directory(params.config_dir,
             owner=params.zk_user,
             create_parents = True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
index 63aa13e..3f2502a 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
@@ -75,8 +75,8 @@ class ZookeeperServerLinux(ZookeeperServer):
     Logger.info("Executing Stack Upgrade pre-restart")
     import params
     env.set_params(params)
-    
-    if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, format_stack_version(params.version)):
+
+    if check_stack_feature(StackFeature.ROLLING_UPGRADE, format_stack_version(params.version)):
       conf_select.select(params.stack_name, "zookeeper", params.version)
       stack_select.select("zookeeper-server", params.version)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_service.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_service.py
index 5069396..441483f 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_service.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_service.py
@@ -19,14 +19,9 @@ Ambari Agent
 
 """
 
-import os
 from ambari_commons import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
-from resource_management.libraries.functions import conf_select, stack_select
 from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.constants import StackFeature
-from resource_management.libraries.functions.version import compare_versions, format_stack_version
-from resource_management.libraries.functions.stack_features import check_stack_feature
 from resource_management.libraries.functions.show_logs import show_logs
 from resource_management.core.resources.system import Execute, File
 from resource_management.core.resources.service import Service
@@ -35,12 +30,6 @@ from resource_management.core.resources.service import Service
 def zookeeper_service(action='start', upgrade_type=None):
   import params
 
-  # This path may be missing after Ambari upgrade. We need to create it.
-  if upgrade_type is None and not os.path.exists(os.path.join(params.stack_root,"/current/zookeeper-server")) and params.current_version \
-    and check_stack_feature(StackFeature.ROLLING_UPGRADE, format_stack_version(params.version)):
-    conf_select.select(params.stack_name, "zookeeper", params.current_version)
-    stack_select.select("zookeeper-server", params.version)
-
   cmd = format("env ZOOCFGDIR={config_dir} ZOOCFG=zoo.cfg {zk_bin}/zkServer.sh")
 
   if action == 'start':

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
index f19c321..783f811 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
@@ -55,10 +55,10 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 stack_version_unformatted = config['hostLevelParams']['stack_version']
 stack_version_formatted = format_stack_version(stack_version_unformatted)
 
-restart_type = default("/commandParams/restart_type", "")
+upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
 version = default("/commandParams/version", None)
 # Handle upgrade and downgrade
-if (restart_type.lower() == "rolling_upgrade" or restart_type.lower() == "nonrolling_upgrade") and version:
+if (upgrade_type is not None) and version:
   stack_version_formatted = format_stack_version(version)
 
 security_enabled = config['configurations']['cluster-env']['security_enabled']

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json
index 945ebbc..0b5ba6a 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json
@@ -38,7 +38,7 @@
         "service_package_folder": "stacks/HDP/2.0.6/services/HBASE/package", 
         "script": "scripts/hbase_client.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "version": "2.2.1.0-2067", 
         "command_timeout": "900", 
         "script_type": "PYTHON"

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu.json b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu.json
index 2b54a82..a6ed6ce 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu.json
@@ -22,7 +22,7 @@
         "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
         "script": "scripts/namenode.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "nonrolling_upgrade", 
+        "upgrade_type": "nonrolling_upgrade",
         "version": "2.3.2.0-2844", 
         "forceRefreshConfigTagsBeforeExecution": "*", 
         "original_stack": "HDP-2.2", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json
index c2281f9..87b18af 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json
@@ -22,7 +22,7 @@
         "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
         "script": "scripts/namenode.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "nonrolling_upgrade", 
+        "upgrade_type": "nonrolling_upgrade",
         "version": "2.3.2.0-2844", 
         "forceRefreshConfigTagsBeforeExecution": "*", 
         "original_stack": "HDP-2.2", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.0.6/configs/nn_ru_lzo.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/nn_ru_lzo.json b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_ru_lzo.json
index d44b002..9f0c236 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/nn_ru_lzo.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_ru_lzo.json
@@ -4,7 +4,7 @@
         "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
         "script": "scripts/namenode.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "version": "2.2.2.0-2603", 
         "command_timeout": "1200", 
         "script_type": "PYTHON"

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.1/configs/client-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/configs/client-upgrade.json b/ambari-server/src/test/python/stacks/2.1/configs/client-upgrade.json
index b279a33..013bb8b 100644
--- a/ambari-server/src/test/python/stacks/2.1/configs/client-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.1/configs/client-upgrade.json
@@ -38,7 +38,7 @@
         "service_package_folder": "stacks/HDP/2.0.6/services/HBASE/package", 
         "script": "scripts/hbase_client.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "version": "2.2.1.0-2067", 
         "command_timeout": "900", 
         "script_type": "PYTHON"

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.1/configs/hive-metastore-upgrade.json
----------------------------------------------------------------------
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 6a3a94a..99fcba0 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
@@ -10,7 +10,7 @@
         "service_package_folder": "common-services/HIVE/0.12.0.2.0/package", 
         "script": "scripts/hive_metastore.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "nonrolling_upgrade", 
+        "upgrade_type": "nonrolling_upgrade",
         "version": "2.3.2.0-2950", 
         "forceRefreshConfigTagsBeforeExecution": "*", 
         "original_stack": "HDP-2.3", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
index 27280f7..f2a0405 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
@@ -20,7 +20,7 @@
         "service_package_folder": "common-services/FALCON/0.5.0.2.1/package", 
         "script": "scripts/falcon_server.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "version": "2.2.1.0-2135", 
         "command_timeout": "1200", 
         "script_type": "PYTHON"

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json
index ee93b74..cb476d3 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json
@@ -25,7 +25,7 @@
         "service_package_folder": "common-services/HIVE/0.12.0.2.0/package",
         "script": "scripts/hive_server.py",
         "hooks_folder": "HDP/2.0.6/hooks",
-        "restart_type": "rolling_upgrade",
+        "upgrade_type": "rolling_upgrade",
         "version": "2.2.1.0-2065",
         "command_timeout": "900",
         "script_type": "PYTHON"

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade-hdfs-secure.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade-hdfs-secure.json b/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade-hdfs-secure.json
index 42ee4ed..03068e5 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade-hdfs-secure.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade-hdfs-secure.json
@@ -50,7 +50,7 @@
         "cluster-env": {}
     }, 
     "commandParams": {
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
         "script": "scripts/journalnode.py", 
         "upgrade_direction": "upgrade", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade.json
index b8ed7d0..7f874cd 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/journalnode-upgrade.json
@@ -50,7 +50,7 @@
         "cluster-env": {}
     }, 
     "commandParams": {
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
         "script": "scripts/journalnode.py", 
         "upgrade_direction": "upgrade", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/knox_upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/knox_upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/knox_upgrade.json
index 63b729e..a9db11c 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/knox_upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/knox_upgrade.json
@@ -19,7 +19,7 @@
         "service_package_folder": "common-services/KNOX/0.5.0.2.2/package", 
         "script": "scripts/knox_gateway.py", 
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "command_retry_max_attempt_count": "3", 
         "version": "2.3.0.0-2096", 
         "original_stack": "HDP-2.3", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
index 7e5346c..fb561f7 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/oozie-downgrade.json
@@ -20,7 +20,7 @@
         "service_package_folder": "common-services/FALCON/0.5.0.2.1/package", 
         "script": "scripts/oozie_server.py",
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "version": "2.2.0.0-0000",
         "command_timeout": "1200", 
         "script_type": "PYTHON",

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
index 1c75d65..86ca03a 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
@@ -20,7 +20,7 @@
         "service_package_folder": "common-services/FALCON/0.5.0.2.1/package", 
         "script": "scripts/oozie_server.py",
         "hooks_folder": "HDP/2.0.6/hooks", 
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "version": "2.2.1.0-2135",
         "upgrade_direction": "upgrade",
         "command_timeout": "1200", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/ranger-admin-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/ranger-admin-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/ranger-admin-upgrade.json
index 7ad76de..cbe8ebe 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/ranger-admin-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/ranger-admin-upgrade.json
@@ -42,7 +42,7 @@
         "cluster-env": {}
     }, 
     "commandParams": {
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "service_package_folder": "common-services/RANGER/0.4.0/package", 
         "script": "scripts/ranger_admin.py", 
         "upgrade_direction": "upgrade", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-server/src/test/python/stacks/2.2/configs/ranger-usersync-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/ranger-usersync-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/ranger-usersync-upgrade.json
index 7b770a7..dc4c43b 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/ranger-usersync-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/ranger-usersync-upgrade.json
@@ -42,7 +42,7 @@
         "cluster-env": {}
     }, 
     "commandParams": {
-        "restart_type": "rolling_upgrade", 
+        "upgrade_type": "rolling_upgrade",
         "service_package_folder": "common-services/RANGER/0.4.0/package", 
         "script": "scripts/ranger_usersync.py", 
         "upgrade_direction": "upgrade", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/ambari-web/app/assets/data/stack_versions/upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/stack_versions/upgrade.json b/ambari-web/app/assets/data/stack_versions/upgrade.json
index 2b6188b..a61e9ce 100644
--- a/ambari-web/app/assets/data/stack_versions/upgrade.json
+++ b/ambari-web/app/assets/data/stack_versions/upgrade.json
@@ -44,7 +44,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting ZOOKEEPER_SERVER on ab2test-1.c.pramod-thangali.internal",
             "end_time" : 1421139703156,
             "group_id" : 1,
@@ -77,7 +77,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting ZOOKEEPER_SERVER on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 1421139720823,
             "group_id" : 1,
@@ -110,7 +110,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting ZOOKEEPER_SERVER on ab2test-2.c.pramod-thangali.internal",
             "end_time" : 1421139730880,
             "group_id" : 1,
@@ -189,7 +189,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting JOURNALNODE on ab2test-1.c.pramod-thangali.internal",
             "end_time" : 1421139774445,
             "group_id" : 2,
@@ -222,7 +222,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting JOURNALNODE on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 1421139792374,
             "group_id" : 2,
@@ -255,7 +255,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting JOURNALNODE on ab2test-2.c.pramod-thangali.internal",
             "end_time" : 1421139812096,
             "group_id" : 2,
@@ -321,7 +321,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting NAMENODE on ab2test-2.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 2,
@@ -354,7 +354,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting NAMENODE on ab2test-1.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 2,
@@ -387,7 +387,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting HISTORYSERVER on ab2test-2.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 2,
@@ -420,7 +420,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting APP_TIMELINE_SERVER on ab2test-2.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 2,
@@ -453,7 +453,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting RESOURCEMANAGER on ab2test-2.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 2,
@@ -519,7 +519,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting HBASE_MASTER on ab2test-1.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 2,
@@ -633,7 +633,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting  DATANODE on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 3,
@@ -666,7 +666,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting  NODEMANAGER on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 3,
@@ -699,7 +699,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting  HBASE_REGIONSERVER on ab2test-1.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 3,
@@ -833,7 +833,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting HDFS_CLIENT on ab2test-1.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 4,
@@ -866,7 +866,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting HDFS_CLIENT on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 4,
@@ -899,7 +899,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting HDFS_CLIENT on ab2test-2.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 4,
@@ -932,7 +932,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting YARN_CLIENT on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 4,
@@ -965,7 +965,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting MAPREDUCE2_CLIENT on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 4,
@@ -998,7 +998,7 @@
           "UpgradeItem" : {
             "cluster_host_info" : "{\"nm_hosts\":[\"1\"],\"hs_host\":[\"2\"],\"hbase_master_hosts\":[\"0\"],\"all_hosts\":[\"ab2test-1.c.pramod-thangali.internal\",\"ab2test-3.c.pramod-thangali.internal\",\"ab2test-2.c.pramod-thangali.internal\"],\"namenode_host\":[\"2\",\"0\"],\"zkfc_hosts\":[\"2\",\"0\"],\"rm_host\":[\"2\"],\"slave_hosts\":[\"1\"],\"app_timeline_server_hosts\":[\"2\"],\"ambari_server_host\":[\"ab2test-1.c.pramod-thangali.internal\"],\"zookeeper_hosts\":[\"0-2\"],\"hbase_rs_hosts\":[\"0\"],\"all_ping_ports\":[\"8670:0-2\"],\"journalnode_hosts\":[\"0-2\"]}",
             "cluster_name" : "1",
-            "command_params" : "{\"restart_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
+            "command_params" : "{\"upgrade_type\":\"rolling_upgrade\",\"version\":\"2.2.1.0-2207\"}",
             "context" : "Restarting HBASE_CLIENT on ab2test-3.c.pramod-thangali.internal",
             "end_time" : 0,
             "group_id" : 4,

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc8a0e8/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py
index 02ef721..6d518f1 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py
@@ -55,10 +55,10 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 stack_version_unformatted = config['hostLevelParams']['stack_version']
 stack_version_formatted = format_stack_version(stack_version_unformatted)
 
-restart_type = default("/commandParams/restart_type", "")
+upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
 version = default("/commandParams/version", None)
 # Handle upgrade and downgrade
-if (restart_type.lower() == "rolling_upgrade" or restart_type.lower() == "nonrolling_upgrade") and version:
+if (upgrade_type is not None) and version:
   stack_version_formatted = format_stack_version(version)
 
 security_enabled = config['configurations']['cluster-env']['security_enabled']


Mime
View raw message