Repository: ambari Updated Branches: refs/heads/branch-2.1 a9305acb7 -> 63691daa6 refs/heads/trunk eb36305a3 -> 25de1567a
AMBARI-13082. Devdeploy: Hdfs components install fails with lzo enabled (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/25de1567 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/25de1567 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/25de1567 Branch: refs/heads/trunk Commit: 25de1567acad680b8d5fd025b26b5082796609bf Parents: eb36305 Author: Andrew Onishuk <[email protected]> Authored: Mon Sep 14 09:18:42 2015 +0300 Committer: Andrew Onishuk <[email protected]> Committed: Mon Sep 14 09:18:42 2015 +0300 ---------------------------------------------------------------------- .../libraries/functions/get_lzo_packages.py | 4 ++-- .../python/resource_management/libraries/script/script.py | 8 +++++--- .../HBASE/0.96.0.2.0/package/scripts/params_linux.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/25de1567/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py index afee520..6dbcef5 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py @@ -39,9 +39,9 @@ def get_lzo_packages(stack_version_unformatted): if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0: if OSCheck.is_redhat_family() or OSCheck.is_suse_family(): - lzo_packages += [format("hadooplzo_{underscored_version}_.+")] + lzo_packages += [format("hadooplzo_{underscored_version}_*")] elif OSCheck.is_ubuntu_family(): - lzo_packages += [format("hadooplzo_{dashed_version}_.+")] + lzo_packages += [format("hadooplzo_{dashed_version}_*")] else: lzo_packages += ["hadoop-lzo"] http://git-wip-us.apache.org/repos/asf/ambari/blob/25de1567/ambari-common/src/main/python/resource_management/libraries/script/script.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index 2155fdb..1ee5b70 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -362,7 +362,8 @@ class Script(object): from this list exclude_packages - list of regexes (possibly raw strings as well), the - packages which match the regex won't be installed + packages which match the regex won't be installed. + NOTE: regexes don't have Python syntax, but simple package regexes which support only * and .* and ? """ config = self.get_config() if 'host_sys_prepped' in config['hostLevelParams']: @@ -401,8 +402,9 @@ class Script(object): @staticmethod def matches_any_regexp(string, regexp_list): for regex in regexp_list: - # adding ^ and $ to correctly match raw strings from begining to the end - if re.match('^' + regex + '$', string): + # we cannot use here Python regex, since * will create some troubles matching plaintext names. + package_regex = '^' + re.escape(regex).replace('\\.\\*','.*').replace("\\?", ".").replace("\\*", ".*") + '$' + if re.match(package_regex, string): return True return False http://git-wip-us.apache.org/repos/asf/ambari/blob/25de1567/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py index dad9658..bdd1229 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py @@ -109,7 +109,7 @@ phoenix_hosts = default('/clusterHostInfo/phoenix_query_server_hosts', []) has_phoenix = len(phoenix_hosts) > 0 if not has_phoenix: - exclude_packages = ['phoenix.+'] + exclude_packages = ['phoenix*'] else: exclude_packages = []
