You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/12/22 17:08:12 UTC

[08/26] ambari git commit: AMBARI-19247 Add log to stack_select for details on which role to get version info (dili)

AMBARI-19247 Add log to stack_select for details on which role to get version info (dili)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 51c4f92c12c876119cca0f0fc0269597c004dba1
Parents: 688830c
Author: Di Li <di...@apache.org>
Authored: Tue Dec 20 15:41:29 2016 -0500
Committer: Di Li <di...@apache.org>
Committed: Tue Dec 20 15:41:29 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/51c4f92c/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 513ceac..4f6ccd2 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
@@ -171,13 +171,14 @@ def get_role_component_current_stack_version():
   role = default("/role", "")
   role_command =  default("/roleCommand", "")
   stack_selector_name = stack_tools.get_stack_tool_name(stack_tools.STACK_SELECTOR_NAME)
-
+  Logger.info("Checking version for {0} via {1}".format(role, stack_selector_name))
   if role in SERVER_ROLE_DIRECTORY_MAP:
     stack_select_component = SERVER_ROLE_DIRECTORY_MAP[role]
   elif role_command == "SERVICE_CHECK" and role in SERVICE_CHECK_DIRECTORY_MAP:
     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))
     return None
 
   current_stack_version = get_stack_version(stack_select_component)