This is an automated email from the ASF dual-hosted git repository.
aonishuk 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 039d95c AMBARI-24149. Agent fails to auto-start HDFS when using LZO
(aonishuk)
039d95c is described below
commit 039d95c27493b61d7141c6bc6c924870332cf63a
Author: Andrew Onishuk <[email protected]>
AuthorDate: Wed Jun 20 14:46:00 2018 +0300
AMBARI-24149. Agent fails to auto-start HDFS when using LZO (aonishuk)
---
.../python/resource_management/libraries/functions/lzo_utils.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py
b/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py
index 30c80f8..e125e4e 100644
---
a/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py
+++
b/ambari-common/src/main/python/resource_management/libraries/functions/lzo_utils.py
@@ -59,6 +59,7 @@ def should_install_lzo():
Return true if lzo is enabled via core-site.xml and GPL license (required
for lzo) is accepted.
"""
config = Script.get_config()
+
stack_version_unformatted = stack_features.get_stack_feature_version(config)
if check_stack_feature(StackFeature.LZO, stack_version_unformatted):
io_compression_codecs =
default("/configurations/core-site/io.compression.codecs", None)
@@ -70,6 +71,11 @@ def should_install_lzo():
if not is_gpl_license_accepted():
Logger.warning(INSTALLING_LZO_WITHOUT_GPL)
return False
+
+ # happens for autostart commands
+ if not 'repositoryFile' in config:
+ Logger.warning("Cannot download lzo packages, since repositories are not
provided.")
+ return False
else:
Logger.info("This stack does not indicate that it supports LZO
installation.")
return False # No LZO support