← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Reviewed:  https://review.openstack.org/259810
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=82636d678883788c3781164e3453b58bfa0661cf
Submitter: Jenkins
Branch:    master

commit 82636d678883788c3781164e3453b58bfa0661cf
Author: Hans Lindgren <hanlind@xxxxxx>
Date:   Fri Dec 11 11:19:07 2015 +0100

    Reduce the number of db/rpc calls to get instance rules
    
    When getting instance rules in virt/firewall.py a for loop is used to
    issue db queries for rules belonging to each individual security group
    in a list of security groups that itself is fetched using a separate
    query.
    
    This can be made much more efficient by querying all rules in a single
    db query joined by instance.
    
    Change-Id: I325f9c71fecde8297842fd608ac3cfd51ea9db71
    Closes-Bug: #1528041


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

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

Status in OpenStack Compute (nova):
  Fix Released

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


References