You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2018/10/30 12:39:39 UTC

[ambari] branch branch-2.7 updated: AMBARI-24784. Ambari-agent cannot register sometimes (aonishuk)

This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 3c2bc7a  AMBARI-24784. Ambari-agent cannot register sometimes (aonishuk)
3c2bc7a is described below

commit 3c2bc7abd66cf7c5930a52b192196d8cc2ffdbbf
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Tue Oct 30 11:51:29 2018 +0200

    AMBARI-24784. Ambari-agent cannot register sometimes (aonishuk)
---
 .../src/main/python/ambari_agent/CustomServiceOrchestrator.py       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index 91c7385..6d15e78 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -415,8 +415,10 @@ class CustomServiceOrchestrator(object):
         self.commands_for_component_in_progress[cluster_id][command['role']] += 1
         incremented_commands_for_component = True
 
-        # reset status which was reported, so agent re-reports it after command finished
-        self.initializer_module.component_status_executor.reported_component_status[cluster_id][command['role']]['STATUS'] = None
+        if 'serviceName' in command:
+          service_component_name = command['serviceName'] + "/" + command['role']
+          # reset status which was reported, so agent re-reports it after command finished
+          self.initializer_module.component_status_executor.reported_component_status[cluster_id][service_component_name]['STATUS'] = None
 
       for py_file, current_base_dir in filtered_py_file_list:
         log_info_on_failure = command_name not in self.DONT_DEBUG_FAILURES_FOR_COMMANDS