Excessive calls to keystone from neutron glue code

Bug #1250580 reported by Davanum Srinivas (DIMS)
52
This bug affects 19 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned
Havana
Fix Released
Undecided
Matt Riedemann

Bug Description

This has been noticed before, it just came up again with comments in https://bugs.launchpad.net/neutron/+bug/1250168

[12:23] <dims> salv-orlando, for 1250168, where are the keystone calls being made from? (you indicated a large percent of api calls are keystone in the last comment)
[12:35] <salv-mobile> It looks like all calls in admin context trigger a POST to keystone as the admon token is not cachex
[12:35] <salv-mobile> Cached
[12:36] <salv-mobile> I think this was intentional even if I know do not recall the precise reason
[12:40] <dims> salv-mobile, which file? in python-neutronclient?
[12:41] <salv-mobile> I am afk i think it's either nova.network.neutronv2.api or nova.network.neutronv2
[12:41] <dims> salv-mobile, thx, will take a peek
[12:42] <salv-mobile> The latter would be __init_.py of course

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

Reviewed: https://review.openstack.org/56075
Committed: http://github.com/openstack/nova/commit/85332012dede96fa6729026c2a90594ea0502ac5
Submitter: Jenkins
Branch: master

commit 85332012dede96fa6729026c2a90594ea0502ac5
Author: Davanum Srinivas <email address hidden>
Date: Tue Nov 12 13:25:42 2013 -0500

    Cache Neutron Client for Admin Scenarios

    Store a thread local copy of Neutron client for use with admin
    tokens, this will prevent excessive calls to keystone to mint
    new tokens and will enable reuse of the already set up client
    for subsequent calls in this thread.

    Change-Id: I6346281ca3516c31b195ce71942786d724e5e9df
    Closes-Bug: #1250580

Changed in nova:
status: New → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
tags: added: havana-backport-potential
Revision history for this message
Francois Deppierraz (francois-ctrlaltdel) wrote :

https://bugs.launchpad.net/keystone/+bug/1251123 seems to be another way to mitigate the same issue.

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/82148

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

Reviewed: https://review.openstack.org/54736
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bdc7519862299e43af55d7a7a221669de905d15c
Submitter: Jenkins
Branch: stable/havana

commit bdc7519862299e43af55d7a7a221669de905d15c
Author: Drew Thorstensen <email address hidden>
Date: Mon Oct 21 09:52:28 2013 -0500

    Pass thru credentials to allow re-authentication

    This is a backport of 4 fixes squashed into one because:

    1. They need to all be merged together as they build on each
       other as problems were found in each change after it was
       merged on master.
    2. The 3rd change won't pass Jenkins on it's own so it has
       to be squashed with the 4th and final change, so I'm just
       going to squash the entire topic branch together.

    The change bugs fixed and cherry pick commit hashes are left
    intact for each change.

    Closes-Bug: #1241275
    (cherry picked from commit 51e5f52e4cb60e266ccde71f205c91eb8c97b48b)

    Cache Neutron Client for Admin Scenarios

    Closes-Bug: #1250580
    (cherry picked from commit 85332012dede96fa6729026c2a90594ea0502ac5)

    Users with admin role in Nova should not re-auth with Neutron

    Closes-Bug: 1250763
    (cherry picked from commit 1c1371c78b990447aeaa4377b512f8887e6ff3ce)

    Fix Neutron Authentication for Metadata Service

    Closes-Bug: 1255577
    (cherry picked from commit 652620d12f3afe6845e41d9762b52d23f44fd557)

    ============

    Change-Id: I2858562b180f3e058a2da9d67bef02af80927177

tags: added: in-stable-havana
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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