Fixing extjs check on cdh and mapr
On images generated from sahara-image-elements cluster is being stuck
due to double execution of the unzip code.
This fix prevents the code to be executed twice and in the case it does we
force unzip to overwrite.
A release note was added to this stable/queens backport because the issue
affected the stable release 8.0.1.
Change-Id: I73836a516b839bdb368997af3693c139c1fff390
Story: #2002551
Task: #22113
(cherry picked from commit f5bf9ff264
)
This commit is contained in:
parent
44ec64b118
commit
543983404b
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes `story 2002551`_ in which CDH cluster creation was stuck when the
|
||||
image was generated using sahara-image-elements, and at the same time
|
||||
extjs 2.2 was not injected inside the images generated using
|
||||
sahara-image-pack.
|
||||
|
||||
.. _story 2002551: https://storyboard.openstack.org/#!/story/2002551
|
|
@ -3,19 +3,27 @@
|
|||
EXTJS_DESTINATION_DIR="/var/lib/oozie"
|
||||
EXTJS_DOWNLOAD_URL="https://tarballs.openstack.org/sahara-extra/dist/common-artifacts/ext-2.2.zip"
|
||||
|
||||
extjs_archive=/tmp/$(basename $EXTJS_DOWNLOAD_URL)
|
||||
extjs_basepath=$(basename ${EXTJS_DOWNLOAD_URL})
|
||||
extjs_archive=/tmp/${extjs_basepath}
|
||||
extjs_folder="${extjs_basepath%.*}"
|
||||
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_archive}" ]; then
|
||||
if [ $test_only -eq 0 ]; then
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
function setup_extjs {
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
}
|
||||
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
unzip -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
fi
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
if [ ! -d "${EXTJS_DESTINATION_DIR}/${extjs_folder}" ]; then
|
||||
setup_extjs
|
||||
unzip -o -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_basepath}" ]; then
|
||||
setup_extjs
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -25,7 +25,6 @@ arguments:
|
|||
required: False
|
||||
|
||||
validators:
|
||||
- script: common/install_extjs
|
||||
- os_case:
|
||||
- redhat:
|
||||
- package: wget
|
||||
|
@ -100,6 +99,7 @@ validators:
|
|||
- script:
|
||||
common/install_cloudera:
|
||||
env_vars: [plugin_version]
|
||||
- script: common/install_extjs
|
||||
- os_case:
|
||||
- redhat:
|
||||
- script: centos/turn_off_services
|
||||
|
|
|
@ -3,19 +3,27 @@
|
|||
EXTJS_DESTINATION_DIR="/var/lib/oozie"
|
||||
EXTJS_DOWNLOAD_URL="https://tarballs.openstack.org/sahara-extra/dist/common-artifacts/ext-2.2.zip"
|
||||
|
||||
extjs_archive=/tmp/$(basename $EXTJS_DOWNLOAD_URL)
|
||||
extjs_basepath=$(basename ${EXTJS_DOWNLOAD_URL})
|
||||
extjs_archive=/tmp/${extjs_basepath}
|
||||
extjs_folder="${extjs_basepath%.*}"
|
||||
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_archive}" ]; then
|
||||
if [ $test_only -eq 0 ]; then
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
function setup_extjs {
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
}
|
||||
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
unzip -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
fi
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
if [ ! -d "${EXTJS_DESTINATION_DIR}/${extjs_folder}" ]; then
|
||||
setup_extjs
|
||||
unzip -o -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_basepath}" ]; then
|
||||
setup_extjs
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -28,7 +28,6 @@ arguments:
|
|||
required: False
|
||||
|
||||
validators:
|
||||
- script: common/install_extjs
|
||||
- os_case:
|
||||
- redhat:
|
||||
- package: wget
|
||||
|
@ -101,6 +100,7 @@ validators:
|
|||
- script:
|
||||
common/install_cloudera:
|
||||
env_vars: [plugin_version]
|
||||
- script: common/install_extjs
|
||||
- os_case:
|
||||
- redhat:
|
||||
- script: centos/turn_off_services
|
||||
|
|
|
@ -3,19 +3,27 @@
|
|||
EXTJS_DESTINATION_DIR="/var/lib/oozie"
|
||||
EXTJS_DOWNLOAD_URL="https://tarballs.openstack.org/sahara-extra/dist/common-artifacts/ext-2.2.zip"
|
||||
|
||||
extjs_archive=/tmp/$(basename $EXTJS_DOWNLOAD_URL)
|
||||
extjs_basepath=$(basename ${EXTJS_DOWNLOAD_URL})
|
||||
extjs_archive=/tmp/${extjs_basepath}
|
||||
extjs_folder="${extjs_basepath%.*}"
|
||||
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_archive}" ]; then
|
||||
if [ $test_only -eq 0 ]; then
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
function setup_extjs {
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
}
|
||||
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
unzip -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
fi
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
if [ ! -d "${EXTJS_DESTINATION_DIR}/${extjs_folder}" ]; then
|
||||
setup_extjs
|
||||
unzip -o -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_basepath}" ]; then
|
||||
setup_extjs
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -26,7 +26,6 @@ arguments:
|
|||
required: False
|
||||
|
||||
validators:
|
||||
- script: common/install_extjs
|
||||
- os_case:
|
||||
- redhat:
|
||||
- package: wget
|
||||
|
@ -101,6 +100,7 @@ validators:
|
|||
- script:
|
||||
common/install_cloudera:
|
||||
env_vars: [plugin_version]
|
||||
- script: common/install_extjs
|
||||
- os_case:
|
||||
- redhat:
|
||||
- script: centos/turn_off_services
|
||||
|
|
|
@ -4,19 +4,27 @@ EXTJS_DESTINATION_DIR="/opt/mapr-repository"
|
|||
EXTJS_DOWNLOAD_URL="https://tarballs.openstack.org/sahara-extra/dist/common-artifacts/ext-2.2.zip"
|
||||
EXTJS_NO_UNPACK=1
|
||||
|
||||
extjs_archive=/tmp/$(basename $EXTJS_DOWNLOAD_URL)
|
||||
extjs_basepath=$(basename ${EXTJS_DOWNLOAD_URL})
|
||||
extjs_archive=/tmp/${extjs_basepath}
|
||||
extjs_folder="${extjs_basepath%.*}"
|
||||
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_archive}" ]; then
|
||||
if [ $test_only -eq 0 ]; then
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
function setup_extjs {
|
||||
wget -O $extjs_archive $EXTJS_DOWNLOAD_URL
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
}
|
||||
|
||||
mkdir -p $EXTJS_DESTINATION_DIR
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
unzip -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
fi
|
||||
if [ -z "${EXTJS_NO_UNPACK:-}" ]; then
|
||||
if [ ! -d "${EXTJS_DESTINATION_DIR}/${extjs_folder}" ]; then
|
||||
setup_extjs
|
||||
unzip -o -d "$EXTJS_DESTINATION_DIR" $extjs_archive
|
||||
rm -f $extjs_archive
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
if [ ! -f "${EXTJS_DESTINATION_DIR}/${extjs_basepath}" ]; then
|
||||
setup_extjs
|
||||
mv $extjs_archive $EXTJS_DESTINATION_DIR
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue