From 9269787d39e052318ec59c58102cca128065b37a Mon Sep 17 00:00:00 2001 From: Gerry Buteau Date: Tue, 11 Jul 2017 10:09:15 -0400 Subject: [PATCH] Cinder volume attachment attributes should not be cached The Cinder volume 'attachments' and 'attachments_list' attributes are dynamically built lists and must be queried from the Cinder API on each request. There are several factors that may change the contents of this list that are unknown to Heat. Caching should be prevented for these attributes. Closes-Bug: #1703605 Related-Bug: #1703387 Co-Authored-By: Paul Bourke Change-Id: I1a646e567b2d88f2acf09b3077c205c5b061d4bc --- heat/engine/resources/openstack/cinder/volume.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/heat/engine/resources/openstack/cinder/volume.py b/heat/engine/resources/openstack/cinder/volume.py index 23b05af32..583c68e4f 100644 --- a/heat/engine/resources/openstack/cinder/volume.py +++ b/heat/engine/resources/openstack/cinder/volume.py @@ -223,6 +223,7 @@ class CinderVolume(vb.BaseVolume, sh.SchedulerHintsMixin): _('A string representation of the list of attachments of the ' 'volume.'), type=attributes.Schema.STRING, + cache_mode=attributes.Schema.CACHE_NONE, support_status=support.SupportStatus( status=support.DEPRECATED, message=_('Use property %s.') % ATTACHMENTS_LIST, @@ -236,6 +237,7 @@ class CinderVolume(vb.BaseVolume, sh.SchedulerHintsMixin): ATTACHMENTS_LIST: attributes.Schema( _('The list of attachments of the volume.'), type=attributes.Schema.LIST, + cache_mode=attributes.Schema.CACHE_NONE, support_status=support.SupportStatus(version='9.0.0'), ), MULTI_ATTACH_ATTR: attributes.Schema(