From 24f4e093b6c7290de06b7aaaa1e4dda96e17e5f9 Mon Sep 17 00:00:00 2001 From: Trey Morris Date: Wed, 7 Mar 2012 22:22:16 -0600 Subject: 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 --- nova/db/sqlalchemy/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nova') 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): -- cgit