You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by wu...@apache.org on 2022/11/04 03:20:49 UTC

[ambari] branch trunk updated: AMBARI-25243: Tez/MR service check fails with ClassNotFoundException LzoCodec during host ordered upgrade (#3445)

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

wuzhiguo 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 b0fab7504a AMBARI-25243: Tez/MR service check fails with ClassNotFoundException LzoCodec during host ordered upgrade (#3445)
b0fab7504a is described below

commit b0fab7504a0cc516d4da630090827e0274119c8d
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Fri Nov 4 11:20:44 2022 +0800

    AMBARI-25243: Tez/MR service check fails with ClassNotFoundException LzoCodec during host ordered upgrade (#3445)
---
 .../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 a0f6a5acd0..5a9966c622 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;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_NAME;
@@ -455,6 +456,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 bc4c65a420..ef7830b384 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")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org