Don't assume everyone uses `CONF`

Bug #1406218 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystonemiddleware
In Progress
Medium
Flavio Percoco

Bug Description

Recent changes in keystonemiddleware assume everyone is using a global `CONF` object. This, thankfully enough, is not true and KSM shouldn't assume so

affects: tempest → keystonemiddleware
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

Can you be more specific about what is broken and where so that we can correct this? This bug report is fairly non-specific. We have in one-form or another relied on the cfg object from oslo.config.

I believe the changes that you are referencing are related to enforcing type on the config options. Config options from paste-ini were being interpreted as the wrong type due to this limitation. Assuming an option can be passed from paste-ini and be handled prior to the fixes i'm assuming that caused this bug was unreliable.

We need a way to register the config options with the recognized configuration object(s).

More information will help us to address the concerns.

Changed in keystonemiddleware:
status: New → Incomplete
Revision history for this message
Flavio Percoco (flaper87) wrote :

@Morgan

You're completely right. This report is not helpful at all. I created this based on the discussions here[0] and my proposed patch[1]. Hope this helps.

[0] http://lists.openstack.org/pipermail/openstack-dev/2014-December/053329.html
[1] https://review.openstack.org/#/c/143063/

Changed in keystonemiddleware:
status: Incomplete → New
assignee: nobody → Flavio Percoco (flaper87)
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

@Flavio,

Thanks for the expanded information. This makes the issue significantly easier to see / understand.

Changed in keystonemiddleware:
importance: Undecided → Medium
status: New → Triaged
Changed in keystonemiddleware:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystonemiddleware (master)

Change abandoned by Flavio Percoco (<email address hidden>) on branch: master
Review: https://review.openstack.org/143063

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to keystonemiddleware (master)

Reviewed: https://review.openstack.org/208965
Committed: https://git.openstack.org/cgit/openstack/keystonemiddleware/commit/?id=ba68a74e65ad893e4beeb45b984b2514e60cbdea
Submitter: Jenkins
Branch: master

commit ba68a74e65ad893e4beeb45b984b2514e60cbdea
Author: Mehdi Abaakouk <email address hidden>
Date: Tue Aug 4 10:32:47 2015 +0200

    Allow to use oslo.config without global CONF

    If an application doesn't use a global configuration object and load
    the middleware with api paste, they are no ways to read the
    configuration options from the application configuration file.

    This change fixes that, the api paste config will looks like:

      [filter:authtoken]
      paste.filter_factory = keystonemiddleware.auth_token:filter_factory
      oslo_config_project = aodh

    With this, the keystonemiddleware will automatically load
    the configuration of the project aodh with a local oslo.config object
    instead of the global one.

    This allows application to not rely of the global oslo.config object
    and continue to use paste and keystonemiddleware.

    Closes-bug: #1482078
    Related-bug: #1406218
    Change-Id: I48c3d6a6a5486c9c035a15a75c025be7f5abaab4

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.