Colin Panisset

Handle stack create/update rollbacks as failures

...@@ -25,6 +25,7 @@ LOG = logging.getLogger(__name__) ...@@ -25,6 +25,7 @@ LOG = logging.getLogger(__name__)
25 class Kappa(object): 25 class Kappa(object):
26 26
27 completed_states = ('CREATE_COMPLETE', 'UPDATE_COMPLETE') 27 completed_states = ('CREATE_COMPLETE', 'UPDATE_COMPLETE')
28 + failed_states = ('ROLLBACK_COMPLETE')
28 29
29 def __init__(self, config): 30 def __init__(self, config):
30 self.config = config 31 self.config = config
...@@ -67,6 +68,8 @@ class Kappa(object): ...@@ -67,6 +68,8 @@ class Kappa(object):
67 LOG.debug('Stack status is: %s', status) 68 LOG.debug('Stack status is: %s', status)
68 if status in self.completed_states: 69 if status in self.completed_states:
69 done = True 70 done = True
71 + if status in self.failed_states:
72 + raise ValueError('Could not create stack %s: %s' % (stack_name, status))
70 73
71 def get_role_arn(self, role_name): 74 def get_role_arn(self, role_name):
72 role_arn = None 75 role_arn = None
......