You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/09/14 10:09:49 UTC
[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 <ao...@hortonworks.com>
Authored: Mon Sep 14 09:18:46 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
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 = []