From 6114b084b3fd47e638172cbbe64c6ea9e627e66d Mon Sep 17 00:00:00 2001
From: Ameed Ashour <Ameed.Ashour.ext@nokia.com>
Date: Tue, 10 Jul 2018 13:49:40 +0300
Subject: Set self.stack_id = None after delete stack

Change-Id: I09ad953776804f17f5eedf296955ced51c5ed3a4
JIRA: STORPERF-251
Signed-off-by: Ameed Ashour <Ameed.Ashour.ext@nokia.com>
---
 docker/storperf-master/storperf/storperf_master.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'docker/storperf-master')

diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py
index 7a1444e..7a94af8 100644
--- a/docker/storperf-master/storperf/storperf_master.py
+++ b/docker/storperf-master/storperf/storperf_master.py
@@ -355,7 +355,12 @@ class StorPerfMaster(object):
         stack_id = None
         if (self.stack_id is not None):
             stack_id = self.stack_id
-            self.heat_stack.clean()
+            try:
+                self.heat_stack.clean()
+            except Exception as e:
+                self.logger.error("Stack creation failed")
+                raise Exception(e)
+            self.stack_id = None
         return stack_id
 
     def execute_workloads(self, metadata={}):
-- 
cgit 1.2.3-korg