From fda92763c947b04b3b38674f52e7b0bd851d231f Mon Sep 17 00:00:00 2001 From: Thomas Herve Date: Fri, 30 Jun 2017 14:18:45 +0200 Subject: [PATCH] Don't store attributes if resource not stored If stack-show is called at an inopportune moment in convergence, we can attempt to store the attributes of a resource that isn't actually in the database. This causes occasional gate failures due to an assert. Closes-Bug: #1701569 Change-Id: I50de08ae6b40958781ef4223c82a5c195b0757bf --- heat/engine/service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/heat/engine/service.py b/heat/engine/service.py index 3e903143c4..31b6874da6 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -539,7 +539,8 @@ class EngineService(service.ServiceBase): for stack in stacks: if stack.convergence: for res in six.itervalues(stack.resources): - res.store_attributes() + if res.id is not None: + res.store_attributes() return retval def get_revision(self, cnxt):