oslo-config-generator alphabetizes options

Bug #1356591 reported by Brant Knudson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Fix Released
Medium
Doug Hellmann

Bug Description

oslo-config-generator alphabetizes all the options in a section. This makes the config file harder to use because it's often useful to have config options that might not have similar names near each other.

For example keystone has options "public_bind_host=0.0.0.0" and "admin_bind_host=0.0.0.0", which it's handy to have next to each other, since someone changing admin_bind_host will probably want to consider public_bind_host also.

Also, there's port configs: admin_port=35357 and public_port=5000 which should be near the bind host.

Also, public_workers and admin_workers.

It looks like this could be simulated by putting these into different "sections", but as you can see there would be a lot of sections.

Revision history for this message
Ben Nemec (bnemec) wrote :

This was intentional behavior back when everyone had their sample configs in Git and changes were reviewed. Now that most (all?) projects aren't doing that, we could potentially stop sorting.

I don't know if that would fix this particular issue though. The reason we started sorting was that everything was being written in random order before, which meant adding one option could trigger a reorder of the entire file.

Changed in oslo:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Brant Knudson (blk-u) wrote :

I wouldn't want them in random order either. In Keystone we have our options in 1 file and they're in a list so they're ordered. The list_opts function returns the config options in an ordered list already.

Maybe provide an option where list_opts can indicate to sort the returned options or not (another field in the tuple for Sorted/Unsorted).

Revision history for this message
Ben Nemec (bnemec) wrote :

Ah, come to think of it I think the sorting thing was for group ordering, not individual options. We may just be able to drop the sort on that entirely.

affects: oslo-incubator → oslo.config
Revision history for this message
Dolph Mathews (dolph) wrote :

Worth noting that this bug is blocking Keystone from consuming the python implementation (related to bug https://bugs.launchpad.net/keystone/+bug/1324610 ).

Changed in oslo.config:
milestone: none → next-kilo
Changed in oslo.config:
assignee: nobody → Doug Hellmann (doug-hellmann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.config (master)

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

Changed in oslo.config:
status: Triaged → In Progress
Changed in oslo.config:
milestone: 1.5.0 → next-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.config (master)

Reviewed: https://review.openstack.org/136482
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=6feb19b0704d753d54fae6e46680a086a149b13c
Submitter: Jenkins
Branch: master

commit 6feb19b0704d753d54fae6e46680a086a149b13c
Author: Doug Hellmann <email address hidden>
Date: Fri Nov 21 14:45:13 2014 -0500

    Stop sorting options on output

    The option definitions within a group should not be sorted, since the
    application or library developer may want to present them in a
    particular logical order to make them easier to understand

    Change-Id: I35bf14ad469fd98486cb02ce66c5bfde5e4f1b11
    Closes-Bug: #1356591

Changed in oslo.config:
status: In Progress → Fix Committed
Changed in oslo.config:
status: Fix Committed → Fix Released
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.