This is an automated email from the ASF dual-hosted git repository.
amagyar pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 70edec9 AMBARI-25243. Tez/MR service check fails with
ClassNotFoundException LzoCodec during host ordered upgrade (amagyar) (#2929)
70edec9 is described below
commit 70edec96df354d8b5a1899c8d8c699ef1009bcad
Author: Attila Magyar <[email protected]>
AuthorDate: Fri Apr 12 17:22:09 2019 +0200
AMBARI-25243. Tez/MR service check fails with ClassNotFoundException
LzoCodec during host ordered upgrade (amagyar) (#2929)
---
.../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 43fead0..7722cd8 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;
@@ -457,6 +458,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 0965698..6697256 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
@@ -41,6 +41,7 @@ from resource_management.libraries.functions.stack_features
import check_stack_f
from resource_management.libraries.resources.repository import Repository
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):
@@ -148,6 +149,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")