Load 'name' field for db resource

I405888f46451d2657aa28f610f8ca555215ff5cf changed to load only
a few fields when loading the resource from the db. We should
load 'name' field for it to be used when rasing ConcurrentTransaction
exception.

Change-Id: I699961b75c7c417d03e21b51a2464c39e737ca89
Related-Bug: #1583679
Related-Bug: #1680658
changes/42/470942/1
rabi 5 years ago
parent 3af92c84a7
commit 39f2aa0723
  1. 2
      heat/engine/resource.py

@ -444,7 +444,7 @@ class Resource(status.ResourceStatus):
refresh = merge_metadata is not None
db_res = resource_objects.Resource.get_obj(
self.stack.context, self.id, refresh=refresh,
fields=('rsrc_metadata', 'atomic_key', 'engine_id',
fields=('name', 'rsrc_metadata', 'atomic_key', 'engine_id',
'action', 'status'))
if db_res.action == self.DELETE:
self._db_res_is_deleted = True

Loading…
Cancel
Save