Providers must be created only once

Bug #1408384 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Steve Martinelli

Bug Description

Creating multiple instances of a provider leads to unpredictable results. Instances of dependencies may hold references to any of the instances and it's expected that there will be only one instance of a provider.

The provider instance for the extensions (federation and oauth1) are being created multiple times when keystone-all is run because there's one instance created per pipeline (once for the admin and once for public).

The fix is to ensure there's only one instance created for each provider even when multiple pipelines are created.

Brant Knudson (blk-u)
Changed in keystone:
assignee: nobody → Brant Knudson (blk-u)
Changed in keystone:
status: New → In Progress
Revision history for this message
Brant Knudson (blk-u) wrote :
Changed in keystone:
importance: Undecided → Medium
tags: added: user-experience
Brant Knudson (blk-u)
Changed in keystone:
milestone: none → kilo-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/156065
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=dd8f2d59243400f6c2a15fc14d71da1ba6d68003
Submitter: Jenkins
Branch: master

commit dd8f2d59243400f6c2a15fc14d71da1ba6d68003
Author: Brant Knudson <email address hidden>
Date: Sun Feb 15 07:52:49 2015 -0600

    Fix tests to not load federation manager twice.

    The federation manager is created by load_backends, so the tests
    that require the federation manager shouldn't be creating the
    federation manager in setUp.

    Change-Id: Ib77677166196b5c4b8083e3b132513530a5ca57b
    Partial-Bug: 1408384

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/156069
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=be748da9d1998067e0f0ca4311268af19d479b5e
Submitter: Jenkins
Branch: master

commit be748da9d1998067e0f0ca4311268af19d479b5e
Author: Brant Knudson <email address hidden>
Date: Sun Feb 15 08:39:04 2015 -0600

    Remove unnecessary code setting provider

    When a provider is created, it adds itself to the dependency
    registry, so there's no need to add the provider after creating it.

    Change-Id: I14c1f94e8d0089481d71d0665ed5e2f0855039e5
    Partial-Bug: 1408384

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/156070
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=7ca5ce6c9e00a257262830847f3afedd8ba69a6b
Submitter: Jenkins
Branch: master

commit 7ca5ce6c9e00a257262830847f3afedd8ba69a6b
Author: Brant Knudson <email address hidden>
Date: Sun Feb 15 08:27:34 2015 -0600

    Wrap dependency registry

    The dependency registry (depedency.REGISTRY) was a simple dict
    accessed directly. In order to be able to eventually store more
    information related to the depedency and make sure providers
    aren't set twice, make the registry private and only access the
    registry through functions.

    Change-Id: I5ef98208b911043e066e1b1aebd2c737b589a59b
    Partial-Bug: 1408384

Changed in keystone:
assignee: Brant Knudson (blk-u) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → Brant Knudson (blk-u)
Changed in keystone:
assignee: Brant Knudson (blk-u) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → Brant Knudson (blk-u)
Changed in keystone:
assignee: Brant Knudson (blk-u) → Steve Martinelli (stevemar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/124599
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=695d72224b5439c25a5bfacf08c61cdda1f3b6ca
Submitter: Jenkins
Branch: master

commit 695d72224b5439c25a5bfacf08c61cdda1f3b6ca
Author: Brant Knudson <email address hidden>
Date: Sat Sep 27 10:02:31 2014 -0500

    Avoid multiple instances for a provider

    Creating multiple instances of a provider leads to unpredictable
    results. Instances of dependencies may hold references to any of the
    instances.

    The dependency module raises an exception if another instance of a
    provider is created. The exception has the backtrace where the first
    instance was created.

    Closes-Bug: #1408384
    Change-Id: Idaba61a3cfb851ec7e0e9f7b991f675d77af14e0

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Brant Knudson (<email address hidden>) on branch: master
Review: https://review.openstack.org/156071
Reason: shouldn't need this now that the managers are all created in load_backends.

Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-3 → 2015.1.0
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.