yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #55058
[Bug 1552971] Re: InstanceList.get_by_security_group_id can run very slow
Reviewed: https://review.openstack.org/288548
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e70468e87537965b5db61f32e72ececde84531f2
Submitter: Jenkins
Branch: master
commit e70468e87537965b5db61f32e72ececde84531f2
Author: Paul Griffin <paul.griffin@xxxxxxxxxxx>
Date: Fri Mar 4 15:56:48 2016 +0000
List instances for secgroup without joining on rules
Make db.security_group_get only join rules if specified in
the columns_to_join. This works around a performance issue
with lots of instances and security groups.
Co-Authored-By: Dan Smith <dansmith@xxxxxxxxxx>
Change-Id: Ie3daed133419c41ed22646f9a790570ff47f0eec
Closes-Bug: #1552971
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1552971
Title:
InstanceList.get_by_security_group_id can run very slow
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) mitaka series:
Confirmed
Bug description:
The nova.objects.instance.InstanceList class's
get_by_security_group_id function calls the db.security_group_get
function, which uses the _security_group_get_query() function to
generate a query object. That query, by default, joins with the
secgroup-rules table, and currently the db.security_group_get function
offers no option to avoid joining with the rules. As a result:
If a group-source secgroup-rule exists on a security group with a
large number of instances and a large number of rules, the db query
result will be very large and take multiple seconds to complete, tying
up conductor and making the system unresponsive.
Since the InstanceList.get_by_security_group_id call only aims to
build a list of instances, there is no need in this case to join with
the rules, and so the db.security_group_get call should optionally
avoid joining with the rules table.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1552971/+subscriptions
References