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/08/23 06:00:39 UTC

[ambari] branch trunk updated: AMBARI-24526. Status of components does not become RED if their deamon goes down immediately after successful start (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 500a00b  AMBARI-24526. Status of components does not become RED if their deamon goes down immediately after successful start (aonishuk)
500a00b is described below

commit 500a00b92c76f7444665865a42f26fe356cb28a9
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Wed Aug 22 18:36:38 2018 +0300

    AMBARI-24526. Status of components does not become RED if their deamon goes down immediately after successful start (aonishuk)
---
 .../src/main/python/ambari_agent/CustomServiceOrchestrator.py       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index ecdd4c5..74b7d92 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -82,6 +82,7 @@ class CustomServiceOrchestrator(object):
   CREDENTIAL_STORE_CLASS_PATH_NAME = 'credentialStoreClassPath'
 
   def __init__(self, initializer_module):
+    self.initializer_module = initializer_module
     self.configuration_builder = initializer_module.configuration_builder
     self.host_level_params_cache = initializer_module.host_level_params_cache
     self.config = initializer_module.config
@@ -412,10 +413,13 @@ class CustomServiceOrchestrator(object):
       except NoOptionError:
        log_out_files = None
 
-      if cluster_id != '-1' and cluster_id != 'null':
+      if cluster_id != '-1' and cluster_id != 'null' and not is_status_command:
         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
+
       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
         script_params = [command_name, json_path, current_base_dir, tmpstrucoutfile, logger_level, self.exec_tmp_dir,