summaryrefslogtreecommitdiffstats
path: root/doctor_tests/stack.py
diff options
context:
space:
mode:
authorTomi Juvonen <tomi.juvonen@nokia.com>2018-10-25 13:36:16 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-25 13:36:16 +0000
commitbaac6579556f8216b36db0d0f87f9c2d4f8b4ef5 (patch)
tree71d467ffd009f469671d77927f34b15098ecd431 /doctor_tests/stack.py
parent23bf63c4616040cb0d69cd26238af2a4a7c00a90 (diff)
parenta6575910a137f8932e294f66c9da3194ad937691 (diff)
Merge "Support Apex with services in containers"
Diffstat (limited to 'doctor_tests/stack.py')
-rw-r--r--doctor_tests/stack.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/doctor_tests/stack.py b/doctor_tests/stack.py
index 688c2050..ee586fa8 100644
--- a/doctor_tests/stack.py
+++ b/doctor_tests/stack.py
@@ -44,7 +44,7 @@ class Stack(object):
action_failed = '%s_FAILED' % action
status = action_in_progress
- stack_retries = 150
+ stack_retries = 160
while status == action_in_progress and stack_retries > 0:
time.sleep(2)
try:
@@ -88,7 +88,19 @@ class Stack(object):
template=template,
parameters=parameters)
self.stack_id = stack['stack']['id']
- self.wait_stack_create()
+ try:
+ self.wait_stack_create()
+ except Exception:
+ # It might not always work at first
+ self.log.info('retry creating maintenance stack.......')
+ self.delete()
+ time.sleep(3)
+ stack = self.heat.stacks.create(stack_name=self.stack_name,
+ files=files,
+ template=template,
+ parameters=parameters)
+ self.stack_id = stack['stack']['id']
+ self.wait_stack_create()
def update(self, stack_name, stack_id, template, parameters={}, files={}):
self.heat.stacks.update(stack_name=stack_name,