Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1BE991813C for ; Mon, 14 Sep 2015 08:10:04 +0000 (UTC) Received: (qmail 66996 invoked by uid 500); 14 Sep 2015 08:09:48 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 66900 invoked by uid 500); 14 Sep 2015 08:09:48 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 66883 invoked by uid 99); 14 Sep 2015 08:09:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2015 08:09:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2E2A1DFE20; Mon, 14 Sep 2015 08:09:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aonishuk@apache.org To: commits@ambari.apache.org Date: Mon, 14 Sep 2015 08:09:49 -0000 Message-Id: <86f4bfa52e8e48f1abfa837b2439e4f0@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] ambari git commit: AMBARI-13082. Devdeploy: Hdfs components install fails with lzo enabled (aonishuk) 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/63691daa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/63691daa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/63691daa Branch: refs/heads/branch-2.1 Commit: 63691daa649c824fe95c27c6ce246f7d6fdb67a9 Parents: a9305ac Author: Andrew Onishuk Authored: Mon Sep 14 09:18:46 2015 +0300 Committer: Andrew Onishuk Committed: Mon Sep 14 09:18:46 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/63691daa/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/63691daa/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 962b54c..a2c0c45 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 @@ -354,7 +354,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']: @@ -393,8 +394,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/63691daa/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 54bf7e7..c930586 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 @@ -110,7 +110,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 = []