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/07/29 08:01:16 UTC
[ambari] branch trunk updated: AMBARI-24323. Adding a component
when the agent scripts are moved out and file download disabled takes > 1
hour and timeout (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 95455a4 AMBARI-24323. Adding a component when the agent scripts are moved out and file download disabled takes > 1 hour and timeout (aonishuk)
95455a4 is described below
commit 95455a424d0892aa1859c5f0a190b383d7d3a810
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Tue Jul 24 18:12:56 2018 +0300
AMBARI-24323. Adding a component when the agent scripts are moved out and file download disabled takes > 1 hour and timeout (aonishuk)
---
.../main/python/ambari_agent/CustomServiceOrchestrator.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index 98ef35d..c41118f 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -459,13 +459,14 @@ class CustomServiceOrchestrator(object):
if incremented_commands_for_component:
self.commands_for_component_in_progress[cluster_id][command['role']] -= 1
- if is_status_command and json_path:
- try:
- os.unlink(json_path)
- except OSError:
- pass # Ignore failure
- else:
- self.conditionally_remove_command_file(json_path, ret)
+ if json_path:
+ if is_status_command:
+ try:
+ os.unlink(json_path)
+ except OSError:
+ pass # Ignore failure
+ else:
+ self.conditionally_remove_command_file(json_path, ret)
return ret