Merge "Make sure devstack aborts if DIB fails"
This commit is contained in:
commit
04ea9bf4dd
@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
saveenv=$-
|
||||||
|
set -e
|
||||||
|
|
||||||
# devstack plugin for octavia
|
# devstack plugin for octavia
|
||||||
|
|
||||||
GET_PIP_CACHE_LOCATION=/opt/stack/cache/files/get-pip.py
|
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}
|
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:-}
|
$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
|
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
|
upload_image file://${OCTAVIA_AMP_IMAGE_FILE} $TOKEN
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -799,3 +808,9 @@ if [[ "$1" == "clean" ]]; then
|
|||||||
octavia_cleanup
|
octavia_cleanup
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $saveenv =~ e ]]; then
|
||||||
|
set -e
|
||||||
|
else
|
||||||
|
set +e
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user