summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorTrey Morris <treyemorris@gmail.com>2012-03-07 22:22:16 -0600
committerTrey Morris <treyemorris@gmail.com>2012-03-08 10:04:22 -0600
commit24f4e093b6c7290de06b7aaaa1e4dda96e17e5f9 (patch)
tree738c4c7731dc11e5c548e3ebcf1a44cb5b74619e /nova/db
parentaeea00e33e87b48a940d4f0281c1d923dee4ad4b (diff)
info_cache is related to deleted instance
fixes lp948586 what is now possible: http://pastie.org/3546474 the problem was there were entities hitting the api to get network data for instances that were deleted. Deleted instances did not have the backref to info_cache available. The api would then go to network to get the info, but since the network structures had already been torn down, there was nothing to return. The bug then is that network_info at time of instance deletion was expected to be accessible through the instance['info_cache']. Change-Id: I8ce6ce92e2abe6241d408192ced9526562e978db
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/models.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py
index 48b59a680..379557f18 100644
--- a/nova/db/sqlalchemy/models.py
+++ b/nova/db/sqlalchemy/models.py
@@ -297,9 +297,7 @@ class InstanceInfoCache(BASE, NovaBase):
instance = relationship(Instance,
backref=backref('info_cache', uselist=False),
foreign_keys=instance_id,
- primaryjoin='and_('
- 'InstanceInfoCache.instance_id == Instance.uuid,'
- 'InstanceInfoCache.deleted == False)')
+ primaryjoin=instance_id == Instance.uuid)
class VirtualStorageArray(BASE, NovaBase):