keystone_authtoken options not present in sample config file

Bug #1430115 reported by aeva black
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Tan Lin
keystonemiddleware
Invalid
Undecided
Unassigned

Bug Description

Our docs list a set of options in the [keystone_authtoken] section, which include admin_user, auth_uri, and other such important bits of information for Ironic to authenticate with keystone and subsequently interact with other OpenStack services. These are well documented here:
  http://docs.openstack.org/developer/ironic/deploy/install-guide.html#configure-the-bare-metal-service

However, tools/config/generate_sample.sh is not including this section in the samples it generates. These options are defined in keystonemiddleware/auth_token/_auth.py but only registered by the get_options() class method. They are *not* registered on import.

For reference, here is the IRC log discussing this:

02:11:21 < devananda> jamielennox: interesting. so, our docs at
                      http://docs.openstack.org/developer/ironic/deploy/install-guide.html#configure-the-bare-metal-service
02:11:40 < devananda> say to put things like admin_user and auth_url in [keystone_authtoken] section of the conf file
02:11:57 < devananda> however I dont see those options in our sample file, which is autogenerated
02:12:02 < devananda> which leads me to ask: why not?
02:13:34 < jamielennox> devananda: well those admin_user and auth_url config options are defined by auth_token middleware
02:14:07 < jamielennox> at a guess there was a thing a while ago about how you had to put like a list_opts() or something in so that oslo.config knew all the
                        modules it was supposed to load options for
02:14:20 < jamielennox> i can't remember the details on that
02:14:52 < devananda> so yea, that's completely lame IMO, and we have not switched ironic to doing that
02:15:14 < devananda> because that list is about 50 modules long or something insane and unmaintainable
02:17:20 < devananda> also, we're including that module when auto-generating
02:18:34 < jamielennox> so we have modified the structure of the auth_token module and there have been option changes but nothing that would not have them be
                        imported
02:19:14 < jamielennox> i don't think...
02:21:47 < devananda> well, they're working when setting them
02:21:54 < devananda> but I can't find where they're defined in keystone right now
02:22:38 < jamielennox> https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/auth_token/_auth.py#L133
02:23:02 < devananda> hm. options.extend
02:23:13 < devananda> i'm unfamiliar with this
02:23:38 < jamielennox> it's an auth plugin thing
02:24:45 < jamielennox> devananda: ah ok, they're not being registered at import, but they're in
                        https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/opts.py#L28
02:25:20 < jamielennox> which is the olso.config options thing
02:25:57 < devananda> this seems needlessly convoluted

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → Low
summary: - keystone_authtoken options not found by tools/config/generate_sample.sh
+ keystone_authtoken options not present in sample config file
Revision history for this message
Jamie Lennox (jamielennox) wrote :

By not registering the legacy plugin at run time services that auto generate there config file without manually specifying the modules to import won't have the default admin_username etc options in their sample configs.

Can be gotten around on the service side by adding the keystonemiddleware module to the list of modules oslo.config should import.

Tan Lin (tan-lin-good)
Changed in ironic:
assignee: nobody → Tan Lin (tan-lin-good)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

This isn't a keystonemiddleware bug but was a bug in ironic's generator.rc

Changed in keystonemiddleware:
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/162919
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=1be0fd0a8e769b2719053b2ed243e50fb2f211d3
Submitter: Jenkins
Branch: master

commit 1be0fd0a8e769b2719053b2ed243e50fb2f211d3
Author: Lin Tan <email address hidden>
Date: Tue Mar 10 17:03:40 2015 +0800

    Generate keystone_authtoken options in sample config file

    Adding keystonemiddleware.authtoken as extra libraries
    to register its missing options, like admin_user.
    Update sample conf by running 'tools/config/generate_sample.sh'

    Closes-Bug: #1430115
    Change-Id: Ic8666dc4a3a6b7c5855afb2929d8b14ebe21ca52

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