summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2018-04-05 12:31:39 -0400
committermbeierl <mark.beierl@dell.com>2018-04-05 12:31:39 -0400
commit6d64efd6d50b728dc03ca465f45e15cbd79ce92a (patch)
tree296d81f6cf4b3b9ea0bdc5f70994f4b74331d384
parenta1efb6bde04a0c1d993b40789b8f6f5cc1645734 (diff)
Fixing daily job
Use Ubuntu 16.04 instead as it is LTS and not subject to change Enhance error reporting on stack creation failure Change-Id: Ie187ae44ce66564da9779733a418fc8bb4e1c320 JIRA: STORPERF-240 Signed-off-by: mbeierl <mark.beierl@dell.com>
-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: