summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Tran <jtran@attinteractive.com>2011-08-15 13:22:14 -0700
committerJohn Tran <jtran@attinteractive.com>2011-08-15 13:22:14 -0700
commit066b675e3ce5c2bd67dde124cbe01b68bd1eded8 (patch)
treee54e50b3d571f726905e990fb0e0b1a6c0db8de2
parent2ed3b12cc8da82304cef88dde64631b6348ee60e (diff)
downloadnova-066b675e3ce5c2bd67dde124cbe01b68bd1eded8.tar.gz
nova-066b675e3ce5c2bd67dde124cbe01b68bd1eded8.tar.xz
nova-066b675e3ce5c2bd67dde124cbe01b68bd1eded8.zip
fix bug which DescribeInstances in EC2 api was returning deleted instances
-rw-r--r--nova/db/sqlalchemy/api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index e5d35a20b..e7b71d494 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1209,7 +1209,8 @@ def instance_get_all_by_filters(context, filters):
options(joinedload('security_groups')).\
options(joinedload_all('fixed_ips.network')).\
options(joinedload('metadata')).\
- options(joinedload('instance_type'))
+ options(joinedload('instance_type')).\
+ filter_by(deleted=can_read_deleted(context))
# Make a copy of the filters dictionary to use going forward, as we'll
# be modifying it and we shouldn't affect the caller's use of it.