ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-18043. Not able to proceed with RU downgrade due to spark clients failing to install (aonishuk)
Date Fri, 05 Aug 2016 11:38:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 79a8296a5 -> 6fcdbd42c


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/6fcdbd42
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6fcdbd42
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6fcdbd42

Branch: refs/heads/branch-2.4
Commit: 6fcdbd42ccb3926b8e4f121a0cbe5d9832235ffc
Parents: 79a8296
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Aug 5 14:38:44 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Aug 5 14:38:44 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/6fcdbd42/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/6fcdbd42/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 98a678e..6636643 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
@@ -22,6 +22,7 @@ limitations under the License.
 import status_params
 from resource_management.libraries.functions.stack_features import check_stack_feature
 from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions import Direction
 from setup_spark import *
 
 import resource_management.libraries.functions
@@ -51,9 +52,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)
 


Mime
View raw message