|
@@ -27,6 +27,7 @@ from FileCache import FileCache
|
|
|
from AgentException import AgentException
|
|
|
from PythonExecutor import PythonExecutor
|
|
|
from AmbariConfig import AmbariConfig
|
|
|
+import hostname
|
|
|
|
|
|
|
|
|
logger = logging.getLogger()
|
|
@@ -95,6 +96,11 @@ class CustomServiceOrchestrator():
|
|
|
"""
|
|
|
Converts command to json file and returns file path
|
|
|
"""
|
|
|
+ # Perform few modifications to stay compatible with the way in which
|
|
|
+ # site.pp files are generated by manifestGenerator.py
|
|
|
+ public_fqdn = hostname.public_hostname()
|
|
|
+ command['public_hostname'] = public_fqdn
|
|
|
+ # Now, dump the json file
|
|
|
task_id = command['taskId']
|
|
|
file_path = os.path.join(self.tmp_dir, "command-{0}.json".format(task_id))
|
|
|
# Command json contains passwords, that's why we need proper permissions
|