summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-16 05:19:02 +0000
committerGerrit Code Review <review@openstack.org>2017-06-16 05:19:02 +0000
commitd6499b65add7deb64a504a35928c9e9a86ce91c9 (patch)
tree3578cb15d7e4d1644501bc052bb5268da461c389
parent1c4b725b8529a176847517a3aa9ed0582fa4098f (diff)
parent4b90fe9f00ba1535212fe1f49154a11d78478191 (diff)
Merge "Don't load non-referenced resources from DB" into stable/newton
-rw-r--r--heat/engine/resource.py4
-rw-r--r--heat/engine/stack.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/heat/engine/resource.py b/heat/engine/resource.py
index bd753a1..18eca92 100644
--- a/heat/engine/resource.py
+++ b/heat/engine/resource.py
@@ -259,11 +259,11 @@ class Resource(object):
259 self.current_template_id = None 259 self.current_template_id = None
260 self.root_stack_id = None 260 self.root_stack_id = None
261 261
262 if not stack.has_cache_data(name): 262 if stack.cache_data is None:
263 resource = stack.db_resource_get(name) 263 resource = stack.db_resource_get(name)
264 if resource: 264 if resource:
265 self._load_data(resource) 265 self._load_data(resource)
266 else: 266 elif stack.has_cache_data(name):
267 self.action = stack.cache_data[name]['action'] 267 self.action = stack.cache_data[name]['action']
268 self.status = stack.cache_data[name]['status'] 268 self.status = stack.cache_data[name]['status']
269 self.id = stack.cache_data[name]['id'] 269 self.id = stack.cache_data[name]['id']
diff --git a/heat/engine/stack.py b/heat/engine/stack.py
index 551f8a5..8c70ff6 100644
--- a/heat/engine/stack.py
+++ b/heat/engine/stack.py
@@ -1194,6 +1194,7 @@ class Stack(collections.Mapping):
1194 self.t = template 1194 self.t = template
1195 self.reset_dependencies() 1195 self.reset_dependencies()
1196 self._resources = None 1196 self._resources = None
1197 self.cache_data = None
1197 1198
1198 if action is not self.CREATE: 1199 if action is not self.CREATE:
1199 self.updated_time = oslo_timeutils.utcnow() 1200 self.updated_time = oslo_timeutils.utcnow()