You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2019/04/15 13:32:15 UTC

[ambari] branch branch-2.7 updated: AMBARI-25243. Tez/MR service check fails with ClassNotFoundException LzoCodec during host ordered upgrade (amagyar) (#2929) (#2930)

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

amagyar pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new cc693c3  AMBARI-25243. Tez/MR service check fails with ClassNotFoundException LzoCodec during host ordered upgrade (amagyar) (#2929) (#2930)
cc693c3 is described below

commit cc693c3e518bfd59e728d7d942ce4b1c8b2aea04
Author: Attila Magyar <m....@gmail.com>
AuthorDate: Mon Apr 15 15:32:08 2019 +0200

    AMBARI-25243. Tez/MR service check fails with ClassNotFoundException LzoCodec during host ordered upgrade (amagyar) (#2929) (#2930)
---
 .../ambari/server/controller/AmbariActionExecutionHelper.java      | 2 ++
 .../src/main/resources/custom_actions/scripts/install_packages.py  | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
index c0a7a7b..f586180 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
@@ -22,6 +22,7 @@ import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AGENT_STA
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AGENT_STACK_RETRY_ON_UNAVAILABILITY;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.COMMAND_TIMEOUT;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.COMPONENT_CATEGORY;
+import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.GPL_LICENSE_ACCEPTED;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SCRIPT;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SCRIPT_TYPE;
 
@@ -456,6 +457,7 @@ public class AmbariActionExecutionHelper {
         resourceFilter.getComponentName() : componentName);
 
       Map<String, String> hostLevelParams = execCmd.getHostLevelParams();
+      hostLevelParams.put(GPL_LICENSE_ACCEPTED, configs.getGplLicenseAccepted().toString());
       hostLevelParams.put(AGENT_STACK_RETRY_ON_UNAVAILABILITY, configs.isAgentStackRetryOnInstallEnabled());
       hostLevelParams.put(AGENT_STACK_RETRY_COUNT, configs.getAgentStackRetryOnInstallCount());
       for (Map.Entry<String, String> dbConnectorName : configs.getDatabaseConnectorNames().entrySet()) {
diff --git a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
index 800bb21..14524cc 100644
--- a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
+++ b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
@@ -40,6 +40,7 @@ from resource_management.libraries.functions.repository_util import CommandRepos
 from resource_management.libraries.functions.stack_features import check_stack_feature
 from resource_management.libraries.script.script import Script
 from resource_management.core import sudo
+from resource_management.libraries.functions import lzo_utils
 
 
 class InstallPackages(Script):
@@ -144,6 +145,12 @@ class InstallPackages(Script):
       num_errors += 1
       Logger.logger.exception("Could not install packages. Error: {0}".format(str(err)))
 
+    try:
+      lzo_utils.install_lzo_if_needed()
+    except Exception as err:
+      num_errors += 1
+      Logger.logger.exception("Could not install LZO packages. Error: {0}".format(str(err)))
+
     # Provide correct exit code
     if num_errors > 0:
       raise Fail("Failed to distribute repositories/install packages")