summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/create_glance_image.sh15
-rw-r--r--docker/storperf-master/rest_server.py1
-rw-r--r--docker/storperf-master/storperf/storperf_master.py25
3 files changed, 29 insertions, 12 deletions
diff --git a/ci/create_glance_image.sh b/ci/create_glance_image.sh
index 9181a05..bb2a869 100755
--- a/ci/create_glance_image.sh
+++ b/ci/create_glance_image.sh
@@ -13,7 +13,7 @@ mkdir -p job
ARCH="${ARCH:-$(uname -m)}"
-IMAGE_NAME="Ubuntu 17.04 ${ARCH}"
+IMAGE_NAME="Ubuntu 16.04 ${ARCH}"
echo "Checking for ${IMAGE_NAME} in Glance"
@@ -24,14 +24,14 @@ then
case "${ARCH}" in
aarch64)
- FILE=ubuntu-17.04-server-cloudimg-arm64.img
+ FILE=ubuntu-16.04-server-cloudimg-arm64-disk1.img
PROPERTIES="--property hw_firmware_type=uefi --property hw_video_model=vga"
;;
armhf)
- FILE=ubuntu-17.04-server-cloudimg-armhf.img
+ FILE=ubuntu-16.04-server-cloudimg-armhf-disk1.img
;;
x86_64)
- FILE=ubuntu-17.04-server-cloudimg-amd64.img
+ FILE=ubuntu-16.04-server-cloudimg-amd64-disk1.img
;;
*)
echo "Unsupported architecture: ${ARCH}"
@@ -39,7 +39,12 @@ then
;;
esac
- wget --continue -q "https://cloud-images.ubuntu.com/releases/17.04/release/${FILE}"
+ echo wget --continue -q "https://cloud-images.ubuntu.com/releases/16.04/release/${FILE}"
+ wget --continue -q "https://cloud-images.ubuntu.com/releases/16.04/release/${FILE}"
+ if [ ! -e "${FILE}" ] ; then
+ echo https://cloud-images.ubuntu.com/releases/16.04/release/${FILE} not found
+ exit 1
+ fi
openstack image create "${IMAGE_NAME}" --disk-format qcow2 --public \
${PROPERTIES} \
--container-format bare --file "${FILE}"
diff --git a/docker/storperf-master/rest_server.py b/docker/storperf-master/rest_server.py
index 67d2d05..7f38ab6 100644
--- a/docker/storperf-master/rest_server.py
+++ b/docker/storperf-master/rest_server.py
@@ -192,6 +192,7 @@ class Configure(Resource):
'stack_id': storperf.stack_id})
except Exception as e:
+ self.logger.exception(e)
abort(400, str(e))
@swagger.operation(
diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py
index f4d41f3..7244b66 100644
--- a/docker/storperf-master/storperf/storperf_master.py
+++ b/docker/storperf-master/storperf/storperf_master.py
@@ -52,6 +52,8 @@ class StorPerfMaster(object):
project_domain_id=os.environ.get('OS_PROJECT_DOMAIN_ID'),
project_name=os.environ.get('OS_PROJECT_NAME'))
+ self.logger.debug("OSCreds: %s" % self.os_creds)
+
self.heat_stack = OpenStackHeatStack(self.os_creds,
self.stack_settings)
self.username = None
@@ -137,8 +139,6 @@ class StorPerfMaster(object):
if time_since_check.total_seconds() < 30:
return self._cached_stack_id
- self.logger.debug("OSCreds: %s" % self.os_creds)
-
self.heat_stack.initialize()
if self.heat_stack.get_stack() is not None:
self._last_snaps_check_time = datetime.now()
@@ -274,12 +274,23 @@ class StorPerfMaster(object):
res = heat_utils.get_resources(heat_cli,
self.heat_stack.get_stack().id)
self.logger.error("Stack creation failed")
+ reason = ""
+ failed = False
for resource in res:
- status = resource.status
- self.logger.error("%s: %s" % (resource.name, status))
- if status == u'CREATE_FAILED':
- self.delete_stack()
- raise Exception(resource.status_reason)
+ if resource.status == u'CREATE_FAILED':
+ failed = True
+ reason += "%s: %s " % (resource.name,
+ resource.status_reason)
+ self.logger.error("%s - %s: %s" % (resource.name,
+ resource.status,
+ resource.status_reason))
+
+ if failed:
+ try:
+ self.heat_stack.clean()
+ except Exception:
+ pass
+ raise Exception(reason)
def delete_stack(self):
if self._test_executor is not None: