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 2016/08/05 11:38:00 UTC
ambari git commit: AMBARI-18043. Not able to proceed with RU
downgrade due to spark clients failing to install (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 94fb9b49f -> 5c5e368fe
AMBARI-18043. Not able to proceed with RU downgrade due to spark clients failing to install (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c5e368f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c5e368f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c5e368f
Branch: refs/heads/trunk
Commit: 5c5e368fe04b441daca1fbd51650be4f2ad4bfea
Parents: 94fb9b4
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Aug 5 14:37:33 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Aug 5 14:37:33 2016 +0300
----------------------------------------------------------------------
.../python/resource_management/libraries/functions/version.py | 2 +-
.../common-services/SPARK/1.2.1/package/scripts/params.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/5c5e368f/ambari-common/src/main/python/resource_management/libraries/functions/version.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/version.py b/ambari-common/src/main/python/resource_management/libraries/functions/version.py
index 2500430..01daf08 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/version.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/version.py
@@ -42,7 +42,7 @@ def format_stack_version(input):
if input:
if "-" in input:
input_array = input.split("-")
- input = input_array[0]
+ input = input_array[1]
input = re.sub(r'^\D+', '', input)
input = re.sub(r'\D+$', '', input)
http://git-wip-us.apache.org/repos/asf/ambari/blob/5c5e368f/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
index eded4bd..6e287b4 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
@@ -33,6 +33,7 @@ from resource_management.libraries.functions import get_kinit_path
from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources
from resource_management.libraries.resources.hdfs_resource import HdfsResource
from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions import Direction
# a map of the Ambari role to the component name
@@ -50,9 +51,13 @@ component_directory = Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP,
config = Script.get_config()
tmp_dir = Script.get_tmp_dir()
+upgrade_direction = default("/commandParams/upgrade_direction", None)
+
stack_name = status_params.stack_name
stack_root = Script.get_stack_root()
stack_version_unformatted = config['hostLevelParams']['stack_version']
+if upgrade_direction == Direction.DOWNGRADE:
+ stack_version_unformatted = config['commandParams']['original_stack']
stack_version_formatted = format_stack_version(stack_version_unformatted)
host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False)