ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject [28/50] [abbrv] ambari git commit: AMBARI-21512. Stack Advisor reported an error: KeyError: stack_name while Issued INSTALLED as new state for NODEMANAGER (smohanty)
Date Sun, 23 Jul 2017 23:34:01 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/8de65173
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8de65173
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8de65173

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 8de651738a8338e4744b0a2a661577b08ae01778
Parents: 016df4e
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:07:22 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/8de65173/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/8de65173/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 67f7fe0..321ac4e 100644
--- a/ambari-server/src/main/resources/stacks/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/stack_advisor.py
@@ -2017,9 +2017,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