Report stack_status_reason on heat failure
When stack create fails, report the status reason, instead of just the status. This gives the user useful information about the cause of the failure (out of floating IPs, etc.) instead of just "CREATE_FAILED". Change-Id: Ibbaf14e8959cecfade98d13f8101e333eb76ee6e Closes-Bug: 1516016
This commit is contained in:
parent
f0d11daf6d
commit
dec8f7ab92
|
@ -54,12 +54,14 @@ class FakeHeatStack(object):
|
|||
updated_time=None):
|
||||
self.stack_status = stack_status or ''
|
||||
self.new_statuses = new_statuses or []
|
||||
self.stack_status_reason = stack_status or ''
|
||||
self.idx = 0
|
||||
self.stack_name = stack_name or ''
|
||||
self.updated_time = updated_time
|
||||
|
||||
def get(self):
|
||||
self.stack_status = self.new_statuses[self.idx]
|
||||
self.stack_status_reason = self.new_statuses[self.idx]
|
||||
self.idx += 1
|
||||
if self.idx > 0 and self.stack_status == 'UPDATE_COMPLETE':
|
||||
self.updated_time = self.idx
|
||||
|
|
|
@ -84,7 +84,7 @@ def wait_stack_completion(stack, is_update=False, last_updated_time=None):
|
|||
base.execute_with_retries(stack.get)
|
||||
|
||||
if stack.status != 'COMPLETE':
|
||||
raise ex.HeatStackException(stack.stack_status)
|
||||
raise ex.HeatStackException(stack.stack_status_reason)
|
||||
|
||||
|
||||
def get_resource(stack, resource):
|
||||
|
|
Loading…
Reference in New Issue