You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2018/05/25 15:23:57 UTC

[ambari] branch trunk updated: AMBARI-23922 - PERF 1.0 package not installed in the cluster (#1377)

This is an automated email from the ASF dual-hosted git repository.

swagle 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 dd2b807  AMBARI-23922 - PERF 1.0 package not installed in the cluster (#1377)
dd2b807 is described below

commit dd2b807314298bd0915267e9fbf7bcc346ed6f13
Author: kasakrisz <33...@users.noreply.github.com>
AuthorDate: Fri May 25 17:23:47 2018 +0200

    AMBARI-23922 - PERF 1.0 package not installed in the cluster (#1377)
---
 .../src/main/resources/stacks/PERF/install_packages.sed | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/ambari-server/src/main/resources/stacks/PERF/install_packages.sed b/ambari-server/src/main/resources/stacks/PERF/install_packages.sed
index 013d8df..a62f571 100644
--- a/ambari-server/src/main/resources/stacks/PERF/install_packages.sed
+++ b/ambari-server/src/main/resources/stacks/PERF/install_packages.sed
@@ -14,12 +14,25 @@
 # limitations under the License.
 /actionexecute/{i\
   def actionexecute(self, env):\
+    from resource_management.core.resources.system import Execute\
     # Parse parameters\
     config = Script.get_config()\
-    repository_version = config['roleParams']['repository_version']\
+    try:\
+      command_repository = CommandRepository(config['repositoryFile'])\
+    except KeyError:\
+      raise Fail("The command repository indicated by 'repositoryFile' was not found")\
+    self.repository_version = command_repository.version_string\
+    if self.repository_version is None:\
+      raise Fail("Cannot determine the repository version to install")\
+    self.repository_version = self.repository_version.strip()\
     (stack_selector_name, stack_selector_path, stack_selector_package) = stack_tools.get_stack_tool(stack_tools.STACK_SELECTOR_NAME)\
-    command = 'ambari-python-wrap {0} install {1}'.format(stack_selector_path, repository_version)\
+    command = 'ambari-python-wrap {0} install {1}'.format(stack_selector_path, self.repository_version)\
     Execute(command)\
+    self.structured_output = {\
+      'package_installation_result': 'SUCCESS',\
+      'repository_version_id': command_repository.version_id\
+    }\
+    self.put_structured_out(self.structured_output)\
   def actionexecute_old(self, env):
 d
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
swagle@apache.org.