diff --git a/CHANGES.txt b/CHANGES.txt index 4795203..8941768 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,9 @@ 6. Removed datastore-connector installation options and samples; the connector has been deprecated since February 17th, 2015. For alternatives see: https://groups.google.com/forum/#!topic/gcp-hadoop-announce/D3_OZuqn4_o + 7. Added workaround for a bug where ambari_env.sh and ambari_manual_env.sh + would fail to copy mapreduce.tar.gz, pig.tar.gz, etc., into + hdfs:///hdp/apps/... during setup. Ambari should now work out-of-the-box. 1.2.1 - 2015-05-05 diff --git a/platforms/hdp/install_ambari.sh b/platforms/hdp/install_ambari.sh index 0573638..e4a8502 100644 --- a/platforms/hdp/install_ambari.sh +++ b/platforms/hdp/install_ambari.sh @@ -88,3 +88,20 @@ if [ "$(hostname)" = "${MASTER_HOSTNAME}" ]; then fi chkconfig ambari-server on fi + +# Workaround for issue between 2.2.0.0 and 2.2.4.2-X where hdp-select finds +# 2.2.4.2-X but params.hdp_stack_version is 2.2.0.0, causing setup to silently +# fail to copy all the component tarballs like mapreduce.tar.gz and pig.tar.gz +# into hdfs:///hdp/apps/... +AMBARI_FUNCTIONS_DIR='lib/resource_management/libraries/functions' +SCRIPT_BAD_CONDITION=' or not out.startswith(params.hdp_stack_version)' +AMBARI_LIB_BASE='/usr/lib/ambari-server' +AMBARI_COPY_TARBALLS_SCRIPT="${AMBARI_LIB_BASE}/${AMBARI_FUNCTIONS_DIR}/dynamic_variable_interpretation.py" +if [[ -e ${AMBARI_COPY_TARBALLS_SCRIPT} ]]; then + sed -i "s/${SCRIPT_BAD_CONDITION}//" ${AMBARI_COPY_TARBALLS_SCRIPT} +fi +AMBARI_LIB_BASE='/usr/lib/ambari-agent' +AMBARI_COPY_TARBALLS_SCRIPT="${AMBARI_LIB_BASE}/${AMBARI_FUNCTIONS_DIR}/dynamic_variable_interpretation.py" +if [[ -e ${AMBARI_COPY_TARBALLS_SCRIPT} ]]; then + sed -i "s/${SCRIPT_BAD_CONDITION}//" ${AMBARI_COPY_TARBALLS_SCRIPT} +fi