CONF.auth_url option used inconsistently

Bug #1314354 reported by Nicolas Simonds
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Nicolas Simonds

Bug Description

The Glance registry API will look at the running environment for an $OS_AUTH_URL variable, and if set, it will adjust its auth strategy accordingly. But even if the value is set in the environment, only the value in the config file is used. This is inconsistent.

To reproduce:

* Set up a config file for a glance CLI tool, e.g., the glance-scrubber with no "auth_strategy" or "auth_url" options set
* set an $OS_AUTH_URL environment variable that points to a running Keystone instance
* Try to use the configured tool, e.g., spool up some delayed deletes and try to get the scrubber to purge them

Expected results:

* It should automagically figure out based on the environment that it should talk to Keystone, and should attempt to auth against it

Actual results:

* No auth_url ends up getting set, and glance-scrubber falls flat on its face when trying to update the registry

Revision history for this message
Erno Kuvaja (jokke) wrote :

Hi Nicolas,

The scrubber uses registry v1 client which takes the auth_url from env variables. Could you be bit more specific how do you see this happening, or do you mean that the services does not obey the auth url specified in the client's environment?

Changed in glance:
status: New → Incomplete
Revision history for this message
Erno Kuvaja (jokke) wrote :

Marking as invalid due no response.

Changed in glance:
status: Incomplete → Invalid
Revision history for this message
Nicolas Simonds (nicolas.simonds) wrote :

I didn't respond because you asked a question that could trivially be answered by reproducing the bug as per the original bug report. If you guys are going to make "making contributors answer questions that they have already answered" a prerequisite for handling anything, it's going to take a really long time for anything to get done.

Changed in glance:
status: Invalid → In Progress
assignee: nobody → Nicolas Simonds (nicolas.simonds)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/91127
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=348cef70b90df439301b05e981f8912c0822ecdd
Submitter: Jenkins
Branch: master

commit 348cef70b90df439301b05e981f8912c0822ecdd
Author: Nicolas Simonds <email address hidden>
Date: Tue Apr 29 11:45:37 2014 -0700

    Allow $OS_AUTH_URL environment variable to override config file value

    Make the Glance APIs use this value in a consistent/expected manner
    when it is set. The Principle of Least Surprise dictates that
    setting the value in the environment should override any values in
    the config files.

    Change-Id: Icdc39a2fd0da71a75f4ad0e60e34cfb8e1883787
    Closes-Bug: 1314354

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Changed in glance:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in glance:
milestone: kilo-2 → 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.