You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by di...@apache.org on 2017/01/19 17:20:23 UTC

ambari git commit: AMBARI-19615 clearer error messages for stack_select.py when a role doesn't have a select component name (dili)

Repository: ambari
Updated Branches:
  refs/heads/trunk 7df6416e4 -> ab4bbb647


AMBARI-19615 clearer error messages for stack_select.py when a role doesn't have a select component name (dili)


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

Branch: refs/heads/trunk
Commit: ab4bbb647a0298207b25393056d610136e3593b9
Parents: 7df6416
Author: Di Li <di...@apache.org>
Authored: Thu Jan 19 12:20:06 2017 -0500
Committer: Di Li <di...@apache.org>
Committed: Thu Jan 19 12:20:06 2017 -0500

----------------------------------------------------------------------
 .../resource_management/libraries/functions/stack_select.py     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab4bbb64/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
index 4f6ccd2..f0cdc48 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
@@ -178,7 +178,10 @@ def get_role_component_current_stack_version():
     stack_select_component = SERVICE_CHECK_DIRECTORY_MAP[role]
 
   if stack_select_component is None:
-    Logger.error("Mapping unavailable for role {0}. Skip checking its version.".format(role))
+    if not role:
+      Logger.error("No role information available.")
+    elif not role.lower().endswith("client"):
+      Logger.error("Mapping unavailable for role {0}. Skip checking its version.".format(role))
     return None
 
   current_stack_version = get_stack_version(stack_select_component)