From 6cff5d9e9680a8f98efd0b85841b682c4c4cdb86 Mon Sep 17 00:00:00 2001 From: Taseer Date: Thu, 13 Jul 2017 22:42:20 +0500 Subject: Add reason for stack creation failure JIRA: STORPERF-180 Change-Id: Ic10f5d96ed0d7b38ccd21b59a68b1ccec403023c Signed-off-by: Taseer Ahmed --- docker/storperf-master/rest_server.py | 2 +- docker/storperf-master/storperf/storperf_master.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/storperf-master/rest_server.py b/docker/storperf-master/rest_server.py index cc8d834..ef8975c 100644 --- a/docker/storperf-master/rest_server.py +++ b/docker/storperf-master/rest_server.py @@ -105,7 +105,7 @@ class Configure(Resource): storperf.create_stack() if storperf.stack_id is None: - abort(400, "Stack creation failed") + abort(400, storperf.status_reason) return jsonify({'agent_count': storperf.agent_count, 'agent_flavor': storperf.agent_flavor, diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py index fb3e269..054d2a7 100644 --- a/docker/storperf-master/storperf/storperf_master.py +++ b/docker/storperf-master/storperf/storperf_master.py @@ -273,6 +273,7 @@ class StorPerfMaster(object): self.stack_id = None return True if (status == u'CREATE_FAILED'): + self.status_reason = getattr(stack, 'stack_status_reason') sleep(5) self._heat_client.stacks.delete(stack_id=self.stack_id) sleep(2) -- cgit 1.2.3-korg