Skip to content

Commit

Permalink
info_cache is related to deleted instance
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tr3buchet committed Mar 8, 2012
1 parent aeea00e commit 24f4e09
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nova/db/sqlalchemy/models.py
Expand Up @@ -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):
Expand Down

0 comments on commit 24f4e09

Please sign in to comment.