Merge "Add some comments for delete logic in bay_create"

This commit is contained in:
Jenkins 2015-01-06 19:46:56 +00:00 committed by Gerrit Code Review
commit 34abc87d6a
1 changed files with 3 additions and 1 deletions

View File

@ -107,6 +107,8 @@ class Handler(object):
bay.minions_address = minion_addresses
bay.save()
raise loopingcall.LoopingCallDone()
# poll_and_check is detached and polling long time to check status,
# so another user/client can call delete bay/stack.
if stack.stack_status == 'DELETE_COMPLETE':
LOG.info('Bay has been deleted, stack_id: %s' % bay.stack_id)
raise loopingcall.LoopingCallDone()
@ -130,4 +132,4 @@ class Handler(object):
osc.heat().stacks.delete(stack_id)
bay.destroy()
return None
return None