This is an automated email from the ASF dual-hosted git repository.
adoroszlai 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 ebb00c4 AMBARI-23709. Agent uses compressed topology upon retry
(#1115)
ebb00c4 is described below
commit ebb00c40d53f358f14f6bfa801169148fd079453
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Fri Apr 27 10:28:31 2018 +0200
AMBARI-23709. Agent uses compressed topology upon retry (#1115)
---
.../src/main/python/ambari_agent/CustomServiceOrchestrator.py | 8 ++++++--
1 file changed, 6 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 62cc3c8..48d7807 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -489,7 +489,13 @@ class CustomServiceOrchestrator():
# remove data populated from topology to avoid merge and just override
if 'clusterHostInfo' in command_header:
del command_dict['clusterHostInfo']
+
command = Utils.update_nested(Utils.get_mutable_copy(command_dict),
command_header)
+
+ # topology needs to be decompressed if and only if it originates from
command header
+ if 'clusterHostInfo' in command_header and
command_header['clusterHostInfo']:
+ command['clusterHostInfo'] =
self.decompressClusterHostInfo(command['clusterHostInfo'])
+
return command
def requestComponentStatus(self, command_header):
@@ -547,8 +553,6 @@ class CustomServiceOrchestrator():
file_path = os.path.join(self.tmp_dir, "status_command.json")
else:
task_id = command['taskId']
- if 'clusterHostInfo' in command and command['clusterHostInfo'] and not
retry:
- command['clusterHostInfo'] =
self.decompressClusterHostInfo(command['clusterHostInfo'])
file_path = os.path.join(self.tmp_dir,
"command-{0}.json".format(task_id))
if command_type == ActionQueue.AUTO_EXECUTION_COMMAND:
file_path = os.path.join(self.tmp_dir,
"auto_command-{0}.json".format(task_id))
--
To stop receiving notification emails like this one, please contact
[email protected].