Browse Source

Merge "Make sure devstack aborts if DIB fails"

changes/80/730280/1
Zuul 2 years ago committed by Gerrit Code Review
parent
commit
04ea9bf4dd
  1. 15
      devstack/plugin.sh

15
devstack/plugin.sh

@ -1,5 +1,8 @@
#!/usr/bin/env bash
saveenv=$-
set -e
# devstack plugin for octavia
GET_PIP_CACHE_LOCATION=/opt/stack/cache/files/get-pip.py
@ -110,6 +113,12 @@ function build_octavia_worker_image {
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
if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
echo "Diskimage-builder failed to create the amphora image. Aborting."
exit 1
fi
upload_image file://${OCTAVIA_AMP_IMAGE_FILE} $TOKEN
}
@ -799,3 +808,9 @@ if [[ "$1" == "clean" ]]; then
octavia_cleanup
fi
fi
if [[ $saveenv =~ e ]]; then
set -e
else
set +e
fi

Loading…
Cancel
Save