You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2018/09/22 19:10:08 UTC
[ambari] branch trunk updated: AMBARI-24622. Allow skipping package
operations for LZO on sysprepped hosts (#2360)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai 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 b1966bd AMBARI-24622. Allow skipping package operations for LZO on sysprepped hosts (#2360)
b1966bd is described below
commit b1966bd200225389c5a3cbc29d46892712d19fbe
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Sat Sep 22 21:10:02 2018 +0200
AMBARI-24622. Allow skipping package operations for LZO on sysprepped hosts (#2360)
---
.../resource_management/libraries/functions/lzo_utils.py | 11 +++++++++++
1 file changed, 11 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 4ba7ef3..7d7046c 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
@@ -74,6 +74,13 @@ def should_install_lzo():
return True
+def skip_package_operations():
+ """
+ Return true if LZO packages are assumed to be pre-installed
+ Needs to be separate from should_install_lzo, as that one is used during tarball creation, too
+ """
+ return default("/ambariLevelParams/host_sys_prepped", False) and default("/configurations/cluster-env/sysprep_skip_lzo_package_operations", False)
+
def install_lzo_if_needed():
"""
Install lzo package if {#should_install_lzo} is true
@@ -81,6 +88,10 @@ def install_lzo_if_needed():
if not should_install_lzo():
return
+ if skip_package_operations():
+ Logger.info("Skipping LZO package installation as host is sys prepped")
+ return
+
# If user has just accepted GPL license. GPL repository can not yet be present.
Script.repository_util.create_repo_files()