← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1528041] [NEW] Inefficient use of db calls to get instance rules in virt/firewall.py

 

Public bug reported:

When getting instance rules in virt/firewall.py a for loop is used to
query the db for rules belonging to each individual security group in a
list of security groups that itself comes from a separate query. See:

https://github.com/openstack/nova/blob/47e5199f67949f3cbd73114f4f45591cbc01bdd5/nova/virt/firewall.py#L349

This can be made much more efficient by querying all rules in a single
db query joined by instance.

** Affects: nova
     Importance: Medium
     Assignee: Hans Lindgren (hanlind)
         Status: New


** Tags: db security-groups

-- 
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/1528041

Title:
  Inefficient use of db calls to get instance rules in virt/firewall.py

Status in OpenStack Compute (nova):
  New

Bug description:
  When getting instance rules in virt/firewall.py a for loop is used to
  query the db for rules belonging to each individual security group in
  a list of security groups that itself comes from a separate query.
  See:

  https://github.com/openstack/nova/blob/47e5199f67949f3cbd73114f4f45591cbc01bdd5/nova/virt/firewall.py#L349

  This can be made much more efficient by querying all rules in a single
  db query joined by instance.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1528041/+subscriptions


Follow ups