validate_networks does unnecessary querying to neutron in some cases

Bug #1291565 reported by Aaron Rosen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Aaron Rosen

Bug Description

This patch optimizes validate_networks so that it only queries neutron
when needed. Previously, this method would perform an additional net_list,
list_ports, and show_quota regardless if a request contains only
port_ids. If a request only contains port ids we do not need to check neutron
for quota as these ports are already allocated.

Aaron Rosen (arosen)
Changed in nova:
assignee: nobody → Aaron Rosen (arosen)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/80055

Changed in nova:
status: New → In Progress
Aaron Rosen (arosen)
tags: added: icehouse-rc-potential network
Thierry Carrez (ttx)
tags: added: icehouse-backport-potential
removed: icehouse-rc-potential
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/80055
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6e5f6041a38ddb0b2643dff66d264f3594f1a875
Submitter: Jenkins
Branch: master

commit 6e5f6041a38ddb0b2643dff66d264f3594f1a875
Author: Aaron Rosen <email address hidden>
Date: Wed Mar 12 12:05:15 2014 -0700

    Optimize validate_networks to query neutron only when needed

    This patch optimizes validate_networks so that it only queries neutron
    when needed. Previously, this method would perform an additional net_list,
    list_ports, and show_quota regardless if a request contains only
    port_ids. If a request only contains port ids we do not need to check neutron
    for quota as these ports are already allocated.

    Change-Id: Ia7abc7d95b663f165fc95385dda3bab13b7a43e6
    Closes-bug: #1291565

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.