From c20b33dd1448c1a0b9d8d3141a9fa299d3268f69 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Thu, 21 Jun 2012 14:54:38 +1000 Subject: [PATCH] Use the correct resource name Change-Id: I25d6962dfcc75b703aae6489cd0e751317029bc6 Signed-off-by: Angus Salkeld --- heat/engine/wait_condition.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/heat/engine/wait_condition.py b/heat/engine/wait_condition.py index 16d64082bc..f43f5674d7 100644 --- a/heat/engine/wait_condition.py +++ b/heat/engine/wait_condition.py @@ -69,6 +69,8 @@ class WaitCondition(Resource): def handle_create(self): self._get_handle_resource_id() + res_name = self.resource_id + cntx = self.stack.context # keep polling our Metadata to see if the cfn-signal has written # it yet. The execution here is limited by timeout. @@ -79,7 +81,9 @@ class WaitCondition(Resource): try: while status == 'WAITING': try: - res = db_api.resource_get(self.stack.context, self.id) + res = db_api.resource_get_by_name_and_stack(cntx, + res_name, + self.stack.id) except Exception as ex: if 'not found' in ex: # it has been deleted