From fd7a111cbfe77decfa5adda35793aae6ac7db6ba Mon Sep 17 00:00:00 2001 From: Brian Lamar Date: Fri, 29 Jun 2012 13:28:04 -0400 Subject: Ability to read deleted system metadata records. Update _instance_system_metadata_get_query to use read_deleted from the passed in context instead of just hard-coding "no". Also, use this to ensure system metadata is always collected during delete, even if the instance was deleted elsewhere. Fixes bug 1019357 Change-Id: I9285f110801435344fcaa76ba21fb88c23aac2fa --- nova/db/sqlalchemy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index bc0ba5307..50dd5b824 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -4240,8 +4240,8 @@ def instance_metadata_update(context, instance_uuid, metadata, delete): # System-owned metadata def _instance_system_metadata_get_query(context, instance_uuid, session=None): - return model_query(context, models.InstanceSystemMetadata, session=session, - read_deleted="no").\ + return model_query(context, models.InstanceSystemMetadata, + session=session).\ filter_by(instance_uuid=instance_uuid) -- cgit