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-21789. Component version is not reported (aonishuk)
Date Mon, 28 Aug 2017 13:13:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-3.0-perf 194e391cb -> 1fcf4a759


AMBARI-21789. Component version is not reported (aonishuk)


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

Branch: refs/heads/branch-3.0-perf
Commit: 1fcf4a7590d72617524132de7abae94adf5b4f9e
Parents: 194e391
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Aug 28 16:12:52 2017 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Aug 28 16:12:52 2017 +0300

----------------------------------------------------------------------
 .../python/resource_management/libraries/script/script.py    | 6 +++---
 .../server/controller/AmbariManagementControllerImpl.java    | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1fcf4a75/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 269fc72..ee475a5 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
@@ -228,7 +228,7 @@ class Script(object):
 
         # if repository_version_id is passed, pass it back with the version
         from resource_management.libraries.functions.default import default
-        repo_version_id = default("/hostLevelParams/repository_version_id", None)
+        repo_version_id = default("/roleParams/repository_version_id", None)
         if repo_version_id:
           self.put_structured_out({"repository_version_id": repo_version_id})
 
@@ -241,7 +241,7 @@ class Script(object):
     :return: True or False
     """
     from resource_management.libraries.functions.default import default
-    stack_version_unformatted = str(default("/hostLevelParams/stack_version", ""))
+    stack_version_unformatted = str(default("/clusterLevelParams/stack_version", ""))
     stack_version_formatted = format_stack_version(stack_version_unformatted)
     if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
       if command_name.lower() == "status":
@@ -532,7 +532,7 @@ class Script(object):
   @staticmethod
   def get_stack_name():
     """
-    Gets the name of the stack from hostLevelParams/stack_name.
+    Gets the name of the stack from clusterLevelParams/stack_name.
     :return: a stack name or None
     """
     from resource_management.libraries.functions.default import default

http://git-wip-us.apache.org/repos/asf/ambari/blob/1fcf4a75/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 80c3623..4ba5427 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -2461,6 +2461,8 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
     hostParams.put(REPO_INFO, repoInfo);
     hostParams.putAll(getRcaParameters());
 
+    Map<String, String> roleParams = new TreeMap<>();
+
     // use the effective cluster version here since this command might happen
     // in the context of an upgrade and we should send the repo ID which matches
     // the version being send down
@@ -2479,14 +2481,14 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       try {
         VersionDefinitionXml xml = repoVersion.getRepositoryXml();
         if (null != xml && !StringUtils.isBlank(xml.getPackageVersion(osFamily)))
{
-          hostParams.put(PACKAGE_VERSION, xml.getPackageVersion(osFamily));
+          roleParams.put(PACKAGE_VERSION, xml.getPackageVersion(osFamily));
         }
       } catch (Exception e) {
         throw new AmbariException(String.format("Could not load version xml from repo version
%s",
             repoVersion.getVersion()), e);
       }
 
-      hostParams.put(KeyNames.REPO_VERSION_ID, repoVersion.getId().toString());
+      roleParams.put(KeyNames.REPO_VERSION_ID, repoVersion.getId().toString());
     }
 
     if (roleCommand.equals(RoleCommand.INSTALL)) {
@@ -2536,8 +2538,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
 
     execCmd.setHostLevelParams(hostParams);
 
-    Map<String, String> roleParams = new TreeMap<>();
-
     // !!! consistent with where custom commands put variables
     // !!! after-INSTALL hook checks this such that the stack selection tool won't
     // select-all to a version that is not being upgraded, breaking RU


Mime
View raw message