ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [06/23] ambari git commit: AMBARI-21512. Stack Advisor reported an error: KeyError: stack_name while Issued INSTALLED as new state for NODEMANAGER (smohanty)
Date Fri, 21 Jul 2017 04:38:06 GMT
AMBARI-21512. Stack Advisor reported an error: KeyError: stack_name while Issued INSTALLED
as new state for NODEMANAGER (smohanty)


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

Branch: refs/heads/branch-feature-AMBARI-21450
Commit: 9ac42d0c7e52c75e2cd7c6ac65025ae6ee1a83be
Parents: 6d03069
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Tue Jul 18 22:05:46 2017 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Tue Jul 18 22:05:46 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/ambari/server/agent/hello.rs     | 0
 ambari-server/src/main/resources/stacks/stack_advisor.py      | 7 ++++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9ac42d0c/ambari-server/src/main/java/org/apache/ambari/server/agent/hello.rs
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/hello.rs b/ambari-server/src/main/java/org/apache/ambari/server/agent/hello.rs
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/ambari/blob/9ac42d0c/ambari-server/src/main/resources/stacks/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py
index 1e0d83a..ccbb676 100644
--- a/ambari-server/src/main/resources/stacks/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/stack_advisor.py
@@ -1156,9 +1156,10 @@ class DefaultStackAdvisor(StackAdvisor):
     if cluster_env and "stack_root" in cluster_env:
       stack_root_as_str = cluster_env["stack_root"]
       stack_roots = json.loads(stack_root_as_str)
-      stack_name = cluster_env["stack_name"]
-      if stack_name in stack_roots:
-        stack_root = stack_roots[stack_name]
+      if "stack_name" in cluster_env:
+        stack_name = cluster_env["stack_name"]
+        if stack_name in stack_roots:
+          stack_root = stack_roots[stack_name]
 
     return stack_root
 


Mime
View raw message