get_instance_security_groups() get_admin_context() causes lots of keystone chatter

Bug #1161081 reported by Aaron Rosen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Aaron Rosen
Grizzly
Fix Released
Medium
Aaron Rosen

Bug Description

When nova list is called this line is called for each instance which involes getting a new token from keystone. Instead the token should be extracted from req

https://github.com/openstack/nova/blob/master/nova/network/security_group/quantum_driver.py#L255

Aaron Rosen (arosen)
Changed in nova:
assignee: nobody → Aaron Rosen (arosen)
description: updated
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/25557

Changed in nova:
status: New → In Progress
Revision history for this message
Chris Behrens (cbehrens) wrote :

This bug isn't really valid... that call doesn't grab a new context from keystone. However, I do think the code should be using the context from the request, not creating a new admin context.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/25557
Committed: http://github.com/openstack/nova/commit/1ea02dbcf5ae3e822378a580ac1e54467f664be7
Submitter: Jenkins
Branch: master

commit 1ea02dbcf5ae3e822378a580ac1e54467f664be7
Author: Aaron Rosen <email address hidden>
Date: Wed Mar 27 12:51:33 2013 -0700

    get context from req rather than getting a new admin context

    This patch removes the call to context.get_admin_context() and instead
    obtains the context from the req object. Allowing the context.auth_token
    to be reused.

    Fixes bug 1161081

    Change-Id: I3b104edc2966fc3263fad824b1c4c99df832672e

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25737

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/27392

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/27392
Committed: http://github.com/openstack/nova/commit/f7bcd951138b4d7dc37c567d6725353782376659
Submitter: Jenkins
Branch: stable/grizzly

commit f7bcd951138b4d7dc37c567d6725353782376659
Author: Aaron Rosen <email address hidden>
Date: Wed Mar 27 12:51:33 2013 -0700

    get context from req rather than getting a new admin context

    This patch removes the call to context.get_admin_context() and instead
    obtains the context from the req object. Allowing the context.auth_token
    to be reused.

    Fixes bug 1161081

    Conflicts:

     nova/api/openstack/compute/contrib/security_groups.py

    Change-Id: I3b104edc2966fc3263fad824b1c4c99df832672e
    (cherry picked from commit 1ea02dbcf5ae3e822378a580ac1e54467f664be7)

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.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.