Colin Panisset

Handle stack create/update rollbacks as failures

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