ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-11724. Summary:Config validation fails if no Host Components mapped (aonishuk via srimanth)
Date Sat, 06 Jun 2015 15:55:37 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 323e1600c -> 33dd7f7da


AMBARI-11724. Summary:Config validation fails if no Host Components mapped (aonishuk via srimanth)


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

Branch: refs/heads/branch-2.1
Commit: 33dd7f7da4ef10b419098648289ebe1b40c1f924
Parents: 323e160
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Sat Jun 6 08:51:42 2015 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Sat Jun 6 08:54:47 2015 -0700

----------------------------------------------------------------------
 .../stacks/HDP/2.0.6/services/stack_advisor.py         | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/33dd7f7d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index d3ac39e..7588b02 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -359,12 +359,13 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
             hostComponents[hostName].append(component["StackServiceComponents"]["component_name"])
 
     for host in hosts["items"]:
-      # Not enough physical memory
-      requiredMemory = getMemorySizeRequired(hostComponents[host["Hosts"]["host_name"]],
configurations)
-      if host["Hosts"]["total_mem"] * 1024 < requiredMemory:  # in bytes
-        failureMessage += "Not enough physical RAM on the host {0}. " \
-                          "At least {1} MB is recommended based on components assigned.\n"
\
-          .format(host["Hosts"]["host_name"], requiredMemory/1048576)  # MB
+      if host["Hosts"]["host_name"] in hostComponents:
+        # Not enough physical memory
+        requiredMemory = getMemorySizeRequired(hostComponents[host["Hosts"]["host_name"]],
configurations)
+        if host["Hosts"]["total_mem"] * 1024 < requiredMemory:  # in bytes
+          failureMessage += "Not enough physical RAM on the host {0}. " \
+                            "At least {1} MB is recommended based on components assigned.\n"
\
+            .format(host["Hosts"]["host_name"], requiredMemory/1048576)  # MB
     if failureMessage:
       notEnoughMemoryItem = self.getWarnItem(failureMessage)
       validationItems.extend([{"config-name": "", "item": notEnoughMemoryItem}])


Mime
View raw message