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/16 15:36:26 UTC

[ambari] branch trunk 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 trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


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

commit 345da1abed7c55b6b26c921a0a2ab6b92b37db8d
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Tue Oct 16 15:04:32 2018 +0300

    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 74b7d92..8abb479 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -417,8 +417,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