From bd24e183c1a404286f9b701feb18819d353544b9 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 6 Jul 2012 20:40:00 +0200 Subject: [PATCH] Report errors from nested stacks If creation of a nested stack fails, we need to raise an exception so that creation of the nested stack resource (and hence the enclosing stack) also fails. Change-Id: Ic5eda7f8d044ed2c87fc0e785b1cd8fcf78071a4 Signed-off-by: Zane Bitter --- heat/engine/stack.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/heat/engine/stack.py b/heat/engine/stack.py index f35ae753..cbc46aed 100644 --- a/heat/engine/stack.py +++ b/heat/engine/stack.py @@ -69,6 +69,8 @@ class Stack(Resource): nested_id = self._nested.store(self.stack) self.instance_id_set(nested_id) self._nested.create() + if self._nested.state != self._nested.CREATE_COMPLETE: + raise exception.Error(self._nested.state_description) def handle_create(self): response = urllib2.urlopen(self.properties[PROP_TEMPLATE_URL]) -- 2.45.2