Merge "Fix devstack plugin for /var/log/dib-build exists"

This commit is contained in:
Zuul 2018-12-07 22:53:57 +00:00 committed by Gerrit Code Review
commit 37622044ad

View File

@ -79,9 +79,13 @@ function build_octavia_worker_image {
if [[ ${OCTAVIA_AMP_IMAGE_SIZE:+1} ]] ; then
export PARAM_OCTAVIA_AMP_IMAGE_SIZE='-s '$OCTAVIA_AMP_IMAGE_SIZE
fi
if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
local dib_logs=/var/log/dib-build
sudo mkdir ${dib_logs}
if [[ -e ${dib_logs} ]]; then
sudo rm -rf ${dib_logs}
fi
sudo mkdir -m755 ${dib_logs}
sudo chown $STACK_USER ${dib_logs}
$OCTAVIA_DIR/diskimage-create/diskimage-create.sh -l ${dib_logs}/$(basename $OCTAVIA_AMP_IMAGE_FILE).log $octavia_dib_tracing_arg -o $OCTAVIA_AMP_IMAGE_FILE ${PARAM_OCTAVIA_AMP_BASE_OS:-} ${PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID:-} ${PARAM_OCTAVIA_AMP_IMAGE_SIZE:-}
fi