You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2016/02/12 19:31:04 UTC
[18/19] ambari git commit: AMBARI-15007. Make amazon2015 to be part
of redhat6 family (aonishuk)
AMBARI-15007. Make amazon2015 to be part of redhat6 family (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/abd26b23
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/abd26b23
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/abd26b23
Branch: refs/heads/2.2.1-maint
Commit: abd26b2353751c9ead51672d65b7a781ec987139
Parents: fac9f36
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Feb 12 13:16:43 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Feb 12 13:16:43 2016 +0200
----------------------------------------------------------------------
ambari-agent/conf/unix/ambari-agent | 8 +-
ambari-agent/conf/unix/install-helper.sh | 26 +++-
ambari-agent/pom.xml | 23 ----
.../src/main/python/ambari_commons/os_check.py | 92 ++++++++++---
.../ambari_commons/resources/os_family.json | 129 ++++++++++---------
.../core/providers/__init__.py | 3 +
.../libraries/providers/__init__.py | 3 +
ambari-common/src/main/unix/ambari-python-wrap | 8 +-
ambari-server/conf/unix/ambari-env.sh | 1 +
ambari-server/conf/unix/install-helper.sh | 24 +++-
ambari-server/pom.xml | 12 --
ambari-server/sbin/ambari-server | 7 +-
.../server/state/stack/JsonOsFamilyRoot.java | 38 ++++++
.../ambari/server/state/stack/OsFamily.java | 8 +-
.../main/python/ambari_server/serverSetup.py | 17 ---
.../src/main/python/ambari_server/utils.py | 3 +-
ambari-server/src/main/python/bootstrap.py | 4 +-
.../AMBARI_METRICS/0.1.0/metainfo.xml | 2 +-
.../KERBEROS/1.10.3-10/metainfo.xml | 2 +-
.../HDP/2.3/services/ACCUMULO/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/ATLAS/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/FALCON/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/FLUME/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/HBASE/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/HDFS/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/HIVE/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/KAFKA/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/KNOX/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/OOZIE/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/PIG/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/RANGER/metainfo.xml | 2 +-
.../HDP/2.3/services/RANGER_KMS/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/SLIDER/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/SPARK/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/SQOOP/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/STORM/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/TEZ/metainfo.xml | 2 +-
.../stacks/HDP/2.3/services/YARN/metainfo.xml | 4 +-
.../HDP/2.3/services/ZOOKEEPER/metainfo.xml | 2 +-
.../HDP/2.4/services/ACCUMULO/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/ATLAS/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/FALCON/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/FLUME/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/HBASE/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/HDFS/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/HIVE/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/KAFKA/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/KNOX/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/OOZIE/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/PIG/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/RANGER/metainfo.xml | 2 +-
.../HDP/2.4/services/RANGER_KMS/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/SLIDER/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/SPARK/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/SQOOP/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/STORM/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/TEZ/metainfo.xml | 2 +-
.../stacks/HDP/2.4/services/YARN/metainfo.xml | 4 +-
.../HDP/2.4/services/ZOOKEEPER/metainfo.xml | 2 +-
ambari-server/src/test/python/TestOSCheck.py | 37 ++++--
ambari-server/src/test/resources/os_family.json | 89 +++++++------
61 files changed, 368 insertions(+), 252 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-agent/conf/unix/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent
index 27ade60..31e4100 100755
--- a/ambari-agent/conf/unix/ambari-agent
+++ b/ambari-agent/conf/unix/ambari-agent
@@ -40,7 +40,7 @@ export AMBARI_CONF_DIR=/etc/ambari-server/conf:$PATH
export PYTHONPATH=/usr/lib/python2.6/site-packages:$PYTHONPATH
AMBARI_AGENT=ambari-agent
-PYTHON_WRAP=/var/lib/ambari-agent/ambari-python-wrap
+PYTHON_WRAP=/usr/bin/ambari-python-wrap
PIDDIR=/var/run/ambari-agent
PIDFILE=$PIDDIR/$AMBARI_AGENT.pid
OUTFILE=/var/log/ambari-agent/ambari-agent.out
@@ -81,10 +81,10 @@ change_files_permissions() {
ambari-sudo.sh chown $current_user "/usr/lib/ambari-agent/"
}
-# fills $PYTHON
-. $PYTHON_WRAP -V 2>/dev/null
-export PYTHON=$PYTHON
+if [ -z "$PYTHON" ] ; then
+ export PYTHON=`readlink $PYTHON_WRAP`
+fi
# Trying to read the passphrase from an environment
if [ ! -z $AMBARI_PASSPHRASE ]; then
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-agent/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/install-helper.sh b/ambari-agent/conf/unix/install-helper.sh
index 35c67fb..442ca1b 100644
--- a/ambari-agent/conf/unix/install-helper.sh
+++ b/ambari-agent/conf/unix/install-helper.sh
@@ -30,7 +30,6 @@ JINJA_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_jinja2"
SIMPLEJSON_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_simplejson"
PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
-PYTHON_WRAPER_SOURCE="/var/lib/ambari-agent/ambari-python-wrap"
do_install(){
# setting ambari_commons shared resource
@@ -50,10 +49,6 @@ do_install(){
if [ ! -d "$SIMPLEJSON_DIR" ]; then
ln -s "$SIMPLEJSON_AGENT_DIR" "$SIMPLEJSON_DIR"
fi
- # setting python-wrapper script
- if [ ! -f "$PYTHON_WRAPER_TARGET" ]; then
- ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"
- fi
# on nano Ubuntu, when umask=027 those folders are created without 'x' bit for 'others'.
# which causes failures when hadoop users try to access tmp_dir
@@ -61,6 +56,27 @@ do_install(){
chmod 777 /var/lib/ambari-agent/tmp
chmod 700 /var/lib/ambari-agent/data
+
+ # remove old python wrapper
+ rm -f "$PYTHON_WRAPER_TARGET"
+
+ AMBARI_PYTHON=""
+ python_binaries=( "/usr/bin/python" "/usr/bin/python2" "/usr/bin/python2.7", "/usr/bin/python2.6" )
+ for python_binary in "${python_binaries[@]}"
+ do
+ $python_binary -c "import sys ; ver = sys.version_info ; sys.exit(not (ver >= (2,6) and ver<(3,0)))" 1>/dev/null 2>/dev/null
+
+ if [ $? -eq 0 ] ; then
+ AMBARI_PYTHON="$python_binary"
+ break;
+ fi
+ done
+
+ if [ -z "$AMBARI_PYTHON" ] ; then
+ >&2 echo "Cannot detect python for ambari to use. Please manually set $PYTHON_WRAPER link to point to correct python binary"
+ else
+ ln -s "$AMBARI_PYTHON" "$PYTHON_WRAPER_TARGET"
+ fi
}
do_remove(){
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 63d6044..0015f58 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -237,18 +237,6 @@
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
- <location>../ambari-common/src/main/unix/ambari-python-wrap</location>
- </source>
- </sources>
- </mapping>
- <mapping>
- <directory>/var/lib/ambari-agent/</directory>
- <filemode>755</filemode>
- <username>root</username>
- <groupname>root</groupname>
- <directoryIncluded>false</directoryIncluded>
- <sources>
- <source>
<location>conf/unix/ambari-sudo.sh</location>
</source>
</sources>
@@ -653,17 +641,6 @@
</mapper>
</data>
<data>
- <src>../ambari-common/src/main/unix/ambari-python-wrap</src>
- <type>file</type>
- <mapper>
- <type>perm</type>
- <prefix>/var/lib/ambari-agent</prefix>
- <user>root</user>
- <group>root</group>
- <filemode>755</filemode>
- </mapper>
- </data>
- <data>
<src>conf/unix/ambari-sudo.sh</src>
<type>file</type>
<mapper>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-common/src/main/python/ambari_commons/os_check.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/os_check.py b/ambari-common/src/main/python/ambari_commons/os_check.py
index 904a23b..d30b7f9 100644
--- a/ambari-common/src/main/python/ambari_commons/os_check.py
+++ b/ambari-common/src/main/python/ambari_commons/os_check.py
@@ -18,6 +18,7 @@ See the License for the specific language governing permissions and
limitations under the License.
'''
+import re
import os
import sys
import platform
@@ -55,6 +56,8 @@ RESOURCES_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "resou
# family JSON data
OSFAMILY_JSON_RESOURCE = "os_family.json"
+JSON_OS_MAPPING = "mapping"
+JSON_OS_ALIASES = "aliases"
JSON_OS_TYPE = "distro"
JSON_OS_VERSION = "versions"
JSON_EXTENDS = "extends"
@@ -75,12 +78,29 @@ VER_NT_SERVER = 3
_IS_ORACLE_LINUX = os.path.exists('/etc/oracle-release')
_IS_REDHAT_LINUX = os.path.exists('/etc/redhat-release')
+SYSTEM_RELEASE_FILE = "/etc/system-release"
+
def _is_oracle_linux():
return _IS_ORACLE_LINUX
def _is_redhat_linux():
return _IS_REDHAT_LINUX
+def advanced_check(distribution):
+ distribution = list(distribution)
+ if os.path.exists(SYSTEM_RELEASE_FILE):
+ with open(SYSTEM_RELEASE_FILE, "rb") as fp:
+ issue_content = fp.read()
+
+ if "Amazon" in issue_content:
+ distribution[0] = "amazon"
+ search_groups = re.search('(\d+\.\d+)', issue_content)
+
+ if search_groups:
+ distribution[1] = search_groups.group(1)
+
+ return tuple(distribution)
+
class OS_CONST_TYPE(type):
@@ -98,16 +118,24 @@ class OS_CONST_TYPE(type):
f = open(os.path.join(RESOURCES_DIR, OSFAMILY_JSON_RESOURCE))
json_data = eval(f.read())
f.close()
- for family in json_data:
+
+ if JSON_OS_MAPPING not in json_data:
+ raise Exception("Invalid {0}".format(OSFAMILY_JSON_RESOURCE))
+
+ json_mapping_data = json_data[JSON_OS_MAPPING]
+
+ for family in json_mapping_data:
cls.FAMILY_COLLECTION += [family]
- cls.OS_COLLECTION += json_data[family][JSON_OS_TYPE]
+ cls.OS_COLLECTION += json_mapping_data[family][JSON_OS_TYPE]
cls.OS_FAMILY_COLLECTION += [{
'name': family,
- 'os_list': json_data[family][JSON_OS_TYPE]
+ 'os_list': json_mapping_data[family][JSON_OS_TYPE]
}]
- if JSON_EXTENDS in json_data[family]:
- cls.OS_FAMILY_COLLECTION[-1][JSON_EXTENDS] = json_data[family][JSON_EXTENDS]
+ if JSON_EXTENDS in json_mapping_data[family]:
+ cls.OS_FAMILY_COLLECTION[-1][JSON_EXTENDS] = json_mapping_data[family][JSON_EXTENDS]
+
+ cls.OS_TYPE_ALIASES = json_data[JSON_OS_ALIASES] if JSON_OS_ALIASES in json_data else {}
except:
raise Exception("Couldn't load '%s' file" % OSFAMILY_JSON_RESOURCE)
@@ -167,13 +195,35 @@ class OSCheck:
distribution = platform.dist()
else:
distribution = platform.linux_distribution()
+
+
- if distribution[0] == '' and platform.system().lower() == 'darwin':
- # mac - used for unit tests
- distribution = ("Darwin", "TestOnly", "1.1.1", "1.1.1", "1.1")
+ if distribution[0] == '':
+ distribution = advanced_check(distribution)
+
+ if platform.system().lower() == 'darwin':
+ # mac - used for unit tests
+ distribution = ("Darwin", "TestOnly", "1.1.1", "1.1.1", "1.1")
return distribution
-
+
+ @staticmethod
+ def get_alias(os_type, os_version):
+ version_parts = os_version.split('.')
+ full_os_and_major_version = os_type + version_parts[0]
+
+ if full_os_and_major_version in OSConst.OS_TYPE_ALIASES:
+ alias = OSConst.OS_TYPE_ALIASES[full_os_and_major_version]
+ re_groups = re.search('(\D+)(\d+)$', alias).groups()
+ os_type = re_groups[0]
+ os_major_version = re_groups[1]
+
+ version_parts[0] = os_major_version
+ os_version = '.'.join(version_parts)
+
+ return os_type, os_version
+
+
@staticmethod
def get_os_type():
"""
@@ -184,6 +234,10 @@ class OSCheck:
In case cannot detect - exit.
"""
+ return OSCheck.get_alias(OSCheck._get_os_type(), OSCheck._get_os_version())[0]
+
+ @staticmethod
+ def _get_os_type():
# Read content from /etc/*-release file
# Full release name
dist = OSCheck.os_distribution()
@@ -191,18 +245,18 @@ class OSCheck:
# special cases
if _is_oracle_linux():
- return 'oraclelinux'
+ operatingSystem = 'oraclelinux'
elif operatingSystem.startswith('suse linux enterprise server'):
- return 'sles'
+ operatingSystem = 'sles'
elif operatingSystem.startswith('red hat enterprise linux'):
- return 'redhat'
+ operatingSystem = 'redhat'
elif operatingSystem.startswith('darwin'):
- return 'mac'
+ operatingSystem = 'mac'
- if operatingSystem != '':
- return operatingSystem
- else:
+ if operatingSystem == '':
raise Exception("Cannot detect os type. Exiting...")
+
+ return operatingSystem
@staticmethod
def get_os_family():
@@ -236,11 +290,15 @@ class OSCheck:
In case cannot detect raises exception.
"""
+ return OSCheck.get_alias(OSCheck._get_os_type(), OSCheck._get_os_version())[1]
+
+ @staticmethod
+ def _get_os_version():
# Read content from /etc/*-release file
# Full release name
dist = OSCheck.os_distribution()
dist = dist[1]
-
+
if dist:
return dist
else:
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-common/src/main/python/ambari_commons/resources/os_family.json
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/resources/os_family.json b/ambari-common/src/main/python/ambari_commons/resources/os_family.json
index c0acc2c..1558c1b 100644
--- a/ambari-common/src/main/python/ambari_commons/resources/os_family.json
+++ b/ambari-common/src/main/python/ambari_commons/resources/os_family.json
@@ -1,64 +1,69 @@
{
- "redhat": {
- "distro": [
- "redhat",
- "fedora",
- "centos",
- "oraclelinux",
- "ascendos",
- "amazon",
- "xenserver",
- "oel",
- "ovs",
- "cloudlinux",
- "slc",
- "scientific",
- "psbm",
- "centos linux"
- ],
- "versions": [
- 6,
- 7
- ]
- },
- "debian": {
- "extends" : "ubuntu",
- "distro": [
- "debian"
- ],
- "versions": [
- 7
- ]
- },
- "ubuntu": {
- "distro": [
- "ubuntu"
- ],
- "versions": [
- 12,
- 14
- ]
- },
- "suse": {
- "distro": [
- "sles",
- "sled",
- "opensuse",
- "suse"
- ],
- "versions": [
- 11
- ]
- },
- "winsrv": {
- "distro": [
- "win2008server",
- "win2008serverr2",
- "win2012server",
- "win2012serverr2"
- ],
- "versions": [
- 6
- ]
- }
+ "mapping": {
+ "redhat": {
+ "distro": [
+ "redhat",
+ "fedora",
+ "centos",
+ "oraclelinux",
+ "amazon",
+ "ascendos",
+ "xenserver",
+ "oel",
+ "ovs",
+ "cloudlinux",
+ "slc",
+ "scientific",
+ "psbm",
+ "centos linux"
+ ],
+ "versions": [
+ 6,
+ 7
+ ]
+ },
+ "debian": {
+ "extends" : "ubuntu",
+ "distro": [
+ "debian"
+ ],
+ "versions": [
+ 7
+ ]
+ },
+ "ubuntu": {
+ "distro": [
+ "ubuntu"
+ ],
+ "versions": [
+ 12,
+ 14
+ ]
+ },
+ "suse": {
+ "distro": [
+ "sles",
+ "sled",
+ "opensuse",
+ "suse"
+ ],
+ "versions": [
+ 11
+ ]
+ },
+ "winsrv": {
+ "distro": [
+ "win2008server",
+ "win2008serverr2",
+ "win2012server",
+ "win2012serverr2"
+ ],
+ "versions": [
+ 6
+ ]
+ }
+ },
+ "aliases": {
+ "amazon2015": "amazon6"
+ }
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-common/src/main/python/resource_management/core/providers/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/providers/__init__.py b/ambari-common/src/main/python/resource_management/core/providers/__init__.py
index abb51c3..21ae0d5 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/__init__.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/__init__.py
@@ -41,6 +41,9 @@ class Provider(object):
PROVIDERS = dict(
+ amazon=dict(
+ Package="resource_management.core.providers.package.yumrpm.YumProvider",
+ ),
redhat=dict(
Package="resource_management.core.providers.package.yumrpm.YumProvider",
),
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-common/src/main/python/resource_management/libraries/providers/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/__init__.py b/ambari-common/src/main/python/resource_management/libraries/providers/__init__.py
index 44e9ca1..bd7c98a 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/__init__.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/__init__.py
@@ -21,6 +21,9 @@ Ambari Agent
"""
PROVIDERS = dict(
+ amazon=dict(
+ Repository="resource_management.libraries.providers.repository.RhelSuseRepositoryProvider",
+ ),
redhat=dict(
Repository="resource_management.libraries.providers.repository.RhelSuseRepositoryProvider",
),
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-common/src/main/unix/ambari-python-wrap
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/unix/ambari-python-wrap b/ambari-common/src/main/unix/ambari-python-wrap
index 8dab946..e94467c 100755
--- a/ambari-common/src/main/unix/ambari-python-wrap
+++ b/ambari-common/src/main/unix/ambari-python-wrap
@@ -24,14 +24,14 @@ if [ -a /usr/bin/python2 ] && [ -z "$PYTHON" ]; then
PYTHON=/usr/bin/python2
fi
-if [ -a /usr/bin/python2.6 ] && [ -z "$PYTHON" ]; then
- PYTHON=/usr/bin/python2.6
-fi
-
if [ -a /usr/bin/python2.7 ] && [ -z "$PYTHON" ]; then
PYTHON=/usr/bin/python2.7
fi
+if [ -a /usr/bin/python2.6 ] && [ -z "$PYTHON" ]; then
+ PYTHON=/usr/bin/python2.6
+fi
+
# if no preferable python versions found, try to use system one. Hoping it's Python 2
if [[ -z "$PYTHON" ]]; then
PYTHON=/usr/bin/python
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/conf/unix/ambari-env.sh
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/ambari-env.sh b/ambari-server/conf/unix/ambari-env.sh
index e463ca6..bf7ae56 100644
--- a/ambari-server/conf/unix/ambari-env.sh
+++ b/ambari-server/conf/unix/ambari-env.sh
@@ -17,6 +17,7 @@
AMBARI_PASSHPHRASE="DEV"
export AMBARI_JVM_ARGS=$AMBARI_JVM_ARGS' -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false'
export PATH=$PATH:/var/lib/ambari-server
+export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages
# customize python binary for ambari
# export PYTHON=/usr/bin/python2
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh
index 9dbb2b8..53f6c5e 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -29,7 +29,6 @@ JINJA_SERVER_DIR="/usr/lib/ambari-server/lib/ambari_jinja2"
SIMPLEJSON_SERVER_DIR="/usr/lib/ambari-server/lib/ambari_simplejson"
PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
-PYTHON_WRAPER_SOURCE="/var/lib/ambari-server/ambari-python-wrap"
do_install(){
# setting ambari_commons shared resource
@@ -49,9 +48,26 @@ do_install(){
if [ ! -d "$SIMPLEJSON_DIR" ]; then
ln -s "$SIMPLEJSON_SERVER_DIR" "$SIMPLEJSON_DIR"
fi
- # setting python-wrapper script
- if [ ! -f "$PYTHON_WRAPER_TARGET" ]; then
- ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"
+
+ # remove old python wrapper
+ rm -f "$PYTHON_WRAPER_TARGET"
+
+ AMBARI_PYTHON=""
+ python_binaries=( "/usr/bin/python" "/usr/bin/python2" "/usr/bin/python2.7", "/usr/bin/python2.6" )
+ for python_binary in "${python_binaries[@]}"
+ do
+ $python_binary -c "import sys ; ver = sys.version_info ; sys.exit(not (ver >= (2,6) and ver<(3,0)))" 1>/dev/null 2>/dev/null
+
+ if [ $? -eq 0 ] ; then
+ AMBARI_PYTHON="$python_binary"
+ break;
+ fi
+ done
+
+ if [ -z "$AMBARI_PYTHON" ] ; then
+ >&2 echo "Cannot detect python for ambari to use. Please manually set $PYTHON_WRAPER link to point to correct python binary"
+ else
+ ln -s "$AMBARI_PYTHON" "$PYTHON_WRAPER_TARGET"
fi
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 573d249..f07788f 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -398,18 +398,6 @@
</sources>
</mapping>
<mapping>
- <directory>/var/lib/ambari-server/</directory>
- <filemode>755</filemode>
- <username>root</username>
- <groupname>root</groupname>
- <directoryIncluded>false</directoryIncluded>
- <sources>
- <source>
- <location>../ambari-common/src/main/unix/ambari-python-wrap</location>
- </source>
- </sources>
- </mapping>
- <mapping>
<directory>/etc/ambari-server/conf</directory>
<configuration>true</configuration>
<sources>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/sbin/ambari-server
----------------------------------------------------------------------
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 47e2926..72d94ed 100755
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -37,10 +37,11 @@ esac
export PATH=/usr/lib/ambari-server/*:$PATH:/sbin/:/usr/sbin
export AMBARI_CONF_DIR=/etc/ambari-server/conf
-PYTHON_WRAP=/var/lib/ambari-server/ambari-python-wrap
+PYTHON_WRAP=/usr/bin/ambari-python-wrap
-# fills $PYTHON
-. $PYTHON_WRAP -V 2>/dev/null
+if [ -z "$PYTHON" ] ; then
+ export PYTHON=`readlink $PYTHON_WRAP`
+fi
if [ -a /var/lib/ambari-server/ambari-env.sh ]; then
. /var/lib/ambari-server/ambari-env.sh
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/java/org/apache/ambari/server/state/stack/JsonOsFamilyRoot.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/JsonOsFamilyRoot.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/JsonOsFamilyRoot.java
new file mode 100644
index 0000000..3f9158f
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/JsonOsFamilyRoot.java
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.state.stack;
+
+import java.util.Map;
+
+public class JsonOsFamilyRoot {
+ private Map<String, JsonOsFamilyEntry> mapping;
+ private Map<String, String> aliases;
+
+ public Map<String, JsonOsFamilyEntry> getMapping() {
+ return mapping;
+ }
+ public void setMapping(Map<String, JsonOsFamilyEntry> mapping) {
+ this.mapping = mapping;
+ }
+ public Map<String, String> getAliases() {
+ return aliases;
+ }
+ public void setAliases(Map<String, String> aliases) {
+ this.aliases = aliases;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
index 37a6db3..e494c44 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
@@ -48,11 +48,14 @@ public class OsFamily {
private final String os_pattern = "([\\D]+|(?:[\\D]+[\\d]+[\\D]+))([\\d]*)";
private final String OS_DISTRO = "distro";
private final String OS_VERSION = "versions";
+ private final String OS_MAPPING = "mapping";
+ private final String OS_ALIASES = "aliases";
private final String LOAD_CONFIG_MSG = "Could not load OS family definition from %s file";
private final String FILE_NAME = "os_family.json";
private final Logger LOG = LoggerFactory.getLogger(OsFamily.class);
private Map<String, JsonOsFamilyEntry> osMap = null;
+ private JsonOsFamilyRoot jsonOsFamily = null;
/**
* Initialize object
@@ -77,9 +80,10 @@ public class OsFamily {
if (!f.exists()) throw new Exception();
inputStream = new FileInputStream(f);
- Type type = new TypeToken<Map<String, JsonOsFamilyEntry>>() {}.getType();
+ Type type = new TypeToken<JsonOsFamilyRoot>() {}.getType();
Gson gson = new Gson();
- osMap = gson.fromJson(new InputStreamReader(inputStream), type);
+ jsonOsFamily = gson.fromJson(new InputStreamReader(inputStream), type);
+ osMap = jsonOsFamily.getMapping();
} catch (Exception e) {
LOG.error(String.format(LOAD_CONFIG_MSG, new File(SharedResourcesPath, FILE_NAME).toString()));
throw new RuntimeException(e);
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/python/ambari_server/serverSetup.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py b/ambari-server/src/main/python/ambari_server/serverSetup.py
index 511da27..c370257 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -432,23 +432,6 @@ class JDKSetup(object):
else:
progress_func = download_progress
- if get_silent():
- if not java_home_var:
- #No java_home_var set, detect if java is already installed
- if os.environ.has_key(JAVA_HOME):
- args.java_home = os.environ[JAVA_HOME]
-
- properties.process_pair(JAVA_HOME_PROPERTY, args.java_home)
- properties.removeOldProp(JDK_NAME_PROPERTY)
- properties.removeOldProp(JCE_NAME_PROPERTY)
-
- self._ensure_java_home_env_var_is_set(args.java_home)
- self.jdk_index = self.custom_jdk_number
- return
- else:
- # For now, changing the existing JDK to make sure we use a supported one
- pass
-
if java_home_var:
change_jdk = get_YN_input("Do you want to change Oracle JDK [y/n] (n)? ", False)
if not change_jdk:
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/python/ambari_server/utils.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/utils.py b/ambari-server/src/main/python/ambari_server/utils.py
index 2afcd1b..e7cdb7b 100644
--- a/ambari-server/src/main/python/ambari_server/utils.py
+++ b/ambari-server/src/main/python/ambari_server/utils.py
@@ -224,8 +224,9 @@ def get_postgre_hba_dir(OS_FAMILY):
os.symlink(glob.glob(get_pg_hba_init_files() + '*')[0],
get_pg_hba_init_files())
+ pg_hba_init_basename = os.path.basename(get_pg_hba_init_files())
# Get postgres_data location (default: /var/lib/pgsql/data)
- cmd = "alias exit=return; source " + get_pg_hba_init_files() + " status &>/dev/null; echo $PGDATA"
+ cmd = "alias basename='echo {0}; true' ; alias exit=return; source {1} status &>/dev/null; echo $PGDATA".format(pg_hba_init_basename, get_pg_hba_init_files())
p = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE,
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/python/bootstrap.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py
index adde438..270adda 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -18,12 +18,14 @@ See the License for the specific language governing permissions and
limitations under the License.
'''
+import sys
+sys.path.append("/usr/lib/python2.6/site-packages/") # this file can be run with python2.7 that why we need this
+
# On Linux, the bootstrap process is supposed to run on hosts that may have installed Python 2.4 and above (CentOS 5).
# Hence, the whole bootstrap code needs to comply with Python 2.4 instead of Python 2.6. Most notably, @-decorators and
# {}-format() are to be avoided.
import time
-import sys
import logging
import pprint
import os
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
index 48469df..7874fc3 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
@@ -66,7 +66,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>ambari-metrics-collector</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml
index 72f159a..c1d4db7 100644
--- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml
@@ -73,7 +73,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6</osFamily>
<packages>
<package>
<name>krb5-server</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/metainfo.xml
index 352341b..febfa37 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/metainfo.xml
@@ -24,7 +24,7 @@
<version>1.7.0.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>accumulo_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/metainfo.xml
index fee10d3..f5e741c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/metainfo.xml
@@ -24,7 +24,7 @@
<version>0.5.0.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>atlas-metadata_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml
index 6fdad8b..1d1e3e3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FALCON/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.6.1.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>falcon_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/FLUME/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FLUME/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FLUME/metainfo.xml
index 5031f85..a5892e3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/FLUME/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/FLUME/metainfo.xml
@@ -24,7 +24,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>flume_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml
index 90a31f5..ff55ee7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metainfo.xml
@@ -38,7 +38,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hbase_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml
index ca69195..306ca6a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml
@@ -57,7 +57,7 @@
</osSpecific>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hadoop_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml
index 0756a54..f8c0cff 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml
@@ -33,7 +33,7 @@
</packages>
</osSpecific>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hive_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/metainfo.xml
index 330b542..0ffe982 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.9.0.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>kafka_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/KNOX/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KNOX/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KNOX/metainfo.xml
index d1172b1..c39c559 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KNOX/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KNOX/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.6.0.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>knox_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml
index ccf5de3..20a46b4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/metainfo.xml
@@ -38,7 +38,7 @@
</packages>
</osSpecific>
<osSpecific>
- <osFamily>redhat5,redhat6,redhat7,suse11</osFamily>
+ <osFamily>redhat5,amazon2015,redhat6,redhat7,suse11</osFamily>
<packages>
<package>
<name>oozie_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/PIG/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/PIG/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/PIG/metainfo.xml
index 8ba2426..59782bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/PIG/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/PIG/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.15.0.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>pig_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/metainfo.xml
index 2fb8a9a..78c6f30 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/metainfo.xml
@@ -29,7 +29,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>ranger_2_3_*-admin</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER_KMS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER_KMS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER_KMS/metainfo.xml
index 5606a26..fc4a488 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER_KMS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER_KMS/metainfo.xml
@@ -26,7 +26,7 @@
<extends>common-services/RANGER_KMS/0.5.0.2.3</extends>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>ranger_2_3_*-kms</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
index 8287b50..4b8f522 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SLIDER/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.80.0.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>slider_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/metainfo.xml
index 2c9680c..39fb5e3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/metainfo.xml
@@ -27,7 +27,7 @@
<extends>common-services/SPARK/1.4.1.2.3</extends>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>spark_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/SQOOP/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SQOOP/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SQOOP/metainfo.xml
index 1290cde..68e1f3b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SQOOP/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SQOOP/metainfo.xml
@@ -32,7 +32,7 @@
</packages>
</osSpecific>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>sqoop_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
index 00af620..31291f9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
@@ -24,7 +24,7 @@
<version>0.10.0</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>storm_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/TEZ/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/TEZ/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/TEZ/metainfo.xml
index 7720a3d..95dae9b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/TEZ/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/TEZ/metainfo.xml
@@ -24,7 +24,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>tez_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml
index 5a21200..1cb0e9f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml
@@ -25,7 +25,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hadoop_2_3_*-yarn</name>
@@ -57,7 +57,7 @@
<version>2.7.1.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hadoop_2_3_*-mapreduce</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.3/services/ZOOKEEPER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ZOOKEEPER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ZOOKEEPER/metainfo.xml
index 1f77215..53569e2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ZOOKEEPER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ZOOKEEPER/metainfo.xml
@@ -23,7 +23,7 @@
<version>3.4.6.2.3</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>zookeeper_2_3_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/ACCUMULO/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/ACCUMULO/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/ACCUMULO/metainfo.xml
index 9e82a82..0e6dbff 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/ACCUMULO/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/ACCUMULO/metainfo.xml
@@ -33,7 +33,7 @@
</osSpecific>
</osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>accumulo_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/ATLAS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/ATLAS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/ATLAS/metainfo.xml
index 158ef8c..7ff548e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/ATLAS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/ATLAS/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.5.0.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>atlas-metadata_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/FALCON/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/FALCON/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/FALCON/metainfo.xml
index 183d55c..863b081 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/FALCON/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/FALCON/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.6.1.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>falcon_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/FLUME/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/FLUME/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/FLUME/metainfo.xml
index b7cd3d1..cd3ccfd 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/FLUME/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/FLUME/metainfo.xml
@@ -24,7 +24,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>flume_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/HBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HBASE/metainfo.xml
index a1c2bd0..94b1887 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HBASE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HBASE/metainfo.xml
@@ -24,7 +24,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hbase_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/metainfo.xml
index ce3fb95..401da18 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HDFS/metainfo.xml
@@ -33,7 +33,7 @@
</osSpecific>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hadoop_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/HIVE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HIVE/metainfo.xml
index 5ad52b6..c1d3e0f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/HIVE/metainfo.xml
@@ -33,7 +33,7 @@
</packages>
</osSpecific>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hive_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/KAFKA/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/KAFKA/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/KAFKA/metainfo.xml
index 90bc472..82338a3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/KAFKA/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/KAFKA/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.9.0.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>kafka_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/KNOX/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/KNOX/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/KNOX/metainfo.xml
index e465d42..c6d38e2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/KNOX/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/KNOX/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.6.0.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>knox_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/OOZIE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/OOZIE/metainfo.xml
index 2f09e88..927fc31 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/OOZIE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/OOZIE/metainfo.xml
@@ -39,7 +39,7 @@
</packages>
</osSpecific>
<osSpecific>
- <osFamily>redhat5,redhat6,redhat7,suse11</osFamily>
+ <osFamily>redhat5,amazon2015,redhat6,redhat7,suse11</osFamily>
<packages>
<package>
<name>oozie_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/PIG/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/PIG/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/PIG/metainfo.xml
index 9ae1f42..aec3839 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/PIG/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/PIG/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.15.0.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>pig_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER/metainfo.xml
index d76ad5c..b1ddbcd 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER/metainfo.xml
@@ -27,7 +27,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>ranger_2_4_*-admin</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER_KMS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER_KMS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER_KMS/metainfo.xml
index a27bf31..2654fd9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER_KMS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/RANGER_KMS/metainfo.xml
@@ -27,7 +27,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>ranger_2_4_*-kms</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/SLIDER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SLIDER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SLIDER/metainfo.xml
index ff998f0..c883bc2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SLIDER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SLIDER/metainfo.xml
@@ -23,7 +23,7 @@
<version>0.80.0.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>slider_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/metainfo.xml
index 13c6a9b..562c977 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SPARK/metainfo.xml
@@ -40,7 +40,7 @@
</requiredServices>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>spark_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/SQOOP/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SQOOP/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SQOOP/metainfo.xml
index 721cc33..8caabd4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/SQOOP/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/SQOOP/metainfo.xml
@@ -32,7 +32,7 @@
</packages>
</osSpecific>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>sqoop_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/STORM/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/STORM/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/STORM/metainfo.xml
index 36b01e4..6ce698b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/STORM/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/STORM/metainfo.xml
@@ -24,7 +24,7 @@
<version>0.10.0.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>storm_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/TEZ/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/TEZ/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/TEZ/metainfo.xml
index 356225e..a92214c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/TEZ/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/TEZ/metainfo.xml
@@ -24,7 +24,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>tez_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/YARN/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/YARN/metainfo.xml
index c61a270..7979b9f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/YARN/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/YARN/metainfo.xml
@@ -25,7 +25,7 @@
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hadoop_2_4_*-yarn</name>
@@ -57,7 +57,7 @@
<version>2.7.1.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>hadoop_2_4_*-mapreduce</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/main/resources/stacks/HDP/2.4/services/ZOOKEEPER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/services/ZOOKEEPER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/services/ZOOKEEPER/metainfo.xml
index 4bf4198..1ced6dc 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/services/ZOOKEEPER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/services/ZOOKEEPER/metainfo.xml
@@ -23,7 +23,7 @@
<version>3.4.6.2.4</version>
<osSpecifics>
<osSpecific>
- <osFamily>redhat7,redhat6,suse11</osFamily>
+ <osFamily>redhat7,amazon2015,redhat6,suse11</osFamily>
<packages>
<package>
<name>zookeeper_2_4_*</name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/test/python/TestOSCheck.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestOSCheck.py b/ambari-server/src/test/python/TestOSCheck.py
index ebef706..e14458b 100644
--- a/ambari-server/src/test/python/TestOSCheck.py
+++ b/ambari-server/src/test/python/TestOSCheck.py
@@ -28,7 +28,7 @@ from unittest import TestCase
from mock.mock import patch
from mock.mock import MagicMock
-from ambari_commons import OSCheck
+from ambari_commons import OSCheck, OSConst
import os_check_type
utils = __import__('ambari_server.utils').utils
@@ -48,7 +48,7 @@ class TestOSCheck(TestCase):
# 1 - Any system
mock_is_oracle_linux.return_value = False
- mock_linux_distribution.return_value = ('my_os', '', '')
+ mock_linux_distribution.return_value = ('my_os', '2015.09', '')
result = OSCheck.get_os_type()
self.assertEquals(result, 'my_os')
@@ -64,13 +64,13 @@ class TestOSCheck(TestCase):
# 3 - path exist: '/etc/oracle-release'
mock_is_oracle_linux.return_value = True
- mock_linux_distribution.return_value = ('some_os', '', '')
+ mock_linux_distribution.return_value = ('some_os', '1234', '')
result = OSCheck.get_os_type()
self.assertEquals(result, 'oraclelinux')
# 4 - Common system
mock_is_oracle_linux.return_value = False
- mock_linux_distribution.return_value = ('CenToS', '', '')
+ mock_linux_distribution.return_value = ('CenToS', '4.56', '')
result = OSCheck.get_os_type()
self.assertEquals(result, 'centos')
@@ -97,31 +97,31 @@ class TestOSCheck(TestCase):
# 1 - Any system
mock_exists.return_value = False
- mock_linux_distribution.return_value = ('MY_os', '', '')
+ mock_linux_distribution.return_value = ('MY_os', '5.6.7', '')
result = OSCheck.get_os_family()
self.assertEquals(result, 'my_os')
# 2 - Redhat
mock_exists.return_value = False
- mock_linux_distribution.return_value = ('Centos Linux', '', '')
+ mock_linux_distribution.return_value = ('Centos Linux', '2.4', '')
result = OSCheck.get_os_family()
self.assertEquals(result, 'redhat')
# 3 - Ubuntu
mock_exists.return_value = False
- mock_linux_distribution.return_value = ('Ubuntu', '', '')
+ mock_linux_distribution.return_value = ('Ubuntu', '14.04', '')
result = OSCheck.get_os_family()
self.assertEquals(result, 'ubuntu')
# 4 - Suse
mock_exists.return_value = False
mock_linux_distribution.return_value = (
- 'suse linux enterprise server', '', '')
+ 'suse linux enterprise server', '11.3', '')
result = OSCheck.get_os_family()
self.assertEquals(result, 'suse')
mock_exists.return_value = False
- mock_linux_distribution.return_value = ('SLED', '', '')
+ mock_linux_distribution.return_value = ('SLED', '1.2.3.4.5', '')
result = OSCheck.get_os_family()
self.assertEquals(result, 'suse')
@@ -139,7 +139,7 @@ class TestOSCheck(TestCase):
def test_get_os_version(self, mock_linux_distribution):
# 1 - Any system
- mock_linux_distribution.return_value = ('', '123.45', '')
+ mock_linux_distribution.return_value = ('some_os', '123.45', '')
result = OSCheck.get_os_version()
self.assertEquals(result, '123.45')
@@ -157,7 +157,7 @@ class TestOSCheck(TestCase):
def test_get_os_major_version(self, mock_linux_distribution):
# 1
- mock_linux_distribution.return_value = ('', '123.45.67', '')
+ mock_linux_distribution.return_value = ('abcd_os', '123.45.67', '')
result = OSCheck.get_os_major_version()
self.assertEquals(result, '123')
@@ -165,6 +165,21 @@ class TestOSCheck(TestCase):
mock_linux_distribution.return_value = ('Suse', '11', '')
result = OSCheck.get_os_major_version()
self.assertEquals(result, '11')
+
+ @patch.object(OSCheck, "os_distribution")
+ def test_aliases(self, mock_linux_distribution):
+ OSConst.OS_TYPE_ALIASES['qwerty_os123'] = 'aliased_os5'
+ OSConst.OS_FAMILY_COLLECTION.append({
+ 'name': 'aliased_os_family',
+ 'os_list': ["aliased_os"]
+ })
+
+ mock_linux_distribution.return_value = ('qwerty_os', '123.45.67', '')
+
+ self.assertEquals(OSCheck.get_os_type(), 'aliased_os')
+ self.assertEquals(OSCheck.get_os_major_version(), '5')
+ self.assertEquals(OSCheck.get_os_version(), '5.45.67')
+ self.assertEquals(OSCheck.get_os_family(), 'aliased_os_family')
@patch.object(OSCheck, "os_distribution")
def test_get_os_release_name(self, mock_linux_distribution):
http://git-wip-us.apache.org/repos/asf/ambari/blob/abd26b23/ambari-server/src/test/resources/os_family.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/os_family.json b/ambari-server/src/test/resources/os_family.json
index df55b61..ae6b19e 100644
--- a/ambari-server/src/test/resources/os_family.json
+++ b/ambari-server/src/test/resources/os_family.json
@@ -1,45 +1,50 @@
{
- "redhat": {
- "distro": [
- "redhat",
- "fedora",
- "centos",
- "oraclelinux"
- ],
- "versions": [
- 5,
- 6
- ]
+ "mapping": {
+ "redhat": {
+ "distro": [
+ "redhat",
+ "fedora",
+ "centos",
+ "oraclelinux"
+ ],
+ "versions": [
+ 5,
+ 6
+ ]
+ },
+ "ubuntu": {
+ "distro": [
+ "ubuntu",
+ "debian"
+ ],
+ "versions": [
+ 12
+ ]
+ },
+ "suse": {
+ "distro": [
+ "sles",
+ "sled",
+ "opensuse",
+ "suse"
+ ],
+ "versions": [
+ 11
+ ]
+ },
+ "winsrv": {
+ "distro": [
+ "win2008server",
+ "win2008serverr2",
+ "win2012server",
+ "win2012serverr2"
+ ],
+ "versions": [
+ 6
+ ]
+ }
},
- "ubuntu": {
- "distro": [
- "ubuntu",
- "debian"
- ],
- "versions": [
- 12
- ]
- },
- "suse": {
- "distro": [
- "sles",
- "sled",
- "opensuse",
- "suse"
- ],
- "versions": [
- 11
- ]
- },
- "winsrv": {
- "distro": [
- "win2008server",
- "win2008serverr2",
- "win2012server",
- "win2012serverr2"
- ],
- "versions": [
- 6
- ]
+ "aliases": {
+ "amazon2015": "amazon6"
}
-}
+}
\ No newline at end of file