common/config/generator.py does not properly handle the same option name in multiple groups

Bug #1288586 reported by Steven Dake on 2014-03-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Thomas Herve
Havana
Fix Released
High
Adam Gandelman
oslo-incubator
High
Zane Bitter
Havana
Undecided
Unassigned

Bug Description

The generator.py in master of oslo-incubator does not properly handle the same option names in different groups.

For example if there is a group "heat_api" with bind_host and "heat_api_cfn" with bind_host, one of them will not generate some of the options. In other cases, entire groups are ignored.

To verify, sync the config module into master of heat and check out the difference of the config file.

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

Changed in oslo:
assignee: nobody → Steven Dake (sdake)
status: New → In Progress
Changed in oslo:
importance: Undecided → Medium
Steven Dake (sdake) wrote :

Doug,

Stepping back from fixing this problem. The only way I know how to fix it is to rewrite the config generator, and I don't think I'm the appropriate person to do that. There may be a surgical fix, but I'm not sure what it is.

Changed in oslo:
assignee: Steven Dake (sdake) → nobody
Zane Bitter (zaneb) wrote :

The cause appears to be the fix for bug 1262148. Previously, when looking for an option in a group, it was compared for identity (since __eq__ was not implemented, '==' acted like 'is'). Now that options are compared only for equality, when equal (but not identical) options appear in multiple groups the option will show up only in the first group in the output.

Zane Bitter (zaneb) on 2014-03-11
Changed in oslo:
assignee: nobody → Zane Bitter (zaneb)

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

Doug Hellmann (doug-hellmann) wrote :

Heat has all of their options defined in one file, so I proposed using the new entry point hook to generate their configuration because it won't require potentially breaking changes to the config generator and all of the work can be done in the heat repository. We still need to look at this in oslo in the future, so I am leaving the bug open.

Changed in oslo:
status: In Progress → Triaged
Changed in heat:
status: New → Triaged
importance: Undecided → High
milestone: none → juno-1

Reviewed: https://review.openstack.org/84594
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=df9fa6c0c4cedf9577edfbd6951ee67b33386aa1
Submitter: Jenkins
Branch: master

commit df9fa6c0c4cedf9577edfbd6951ee67b33386aa1
Author: Steve Baker <email address hidden>
Date: Wed Apr 2 13:22:45 2014 +1300

    Disable check_uptodate.sh check in pep8

    Running generate_sample.sh currently produces an invalid heat.conf.sample
    due to bug #1288586.

    This change disables the check_uptodate.sh in the tox pep8 so that the
    gate-heat-pep8 job passes while we find a more appropriate solution.

    Change-Id: Ib20c4f892df68f7112d969d801a18a1a5bfbd474
    Related-Bug: #1288586

Changed in oslo:
importance: Medium → High
milestone: none → juno-1
tags: added: config

Related fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/85915

Reviewed: https://review.openstack.org/85915
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=79d8191c75e3dc5578686fdb68158cae36760641
Submitter: Jenkins
Branch: milestone-proposed

commit 79d8191c75e3dc5578686fdb68158cae36760641
Author: Steve Baker <email address hidden>
Date: Wed Apr 2 13:22:45 2014 +1300

    Disable check_uptodate.sh check in pep8

    Running generate_sample.sh currently produces an invalid heat.conf.sample
    due to bug #1288586.

    This change disables the check_uptodate.sh in the tox pep8 so that the
    gate-heat-pep8 job passes while we find a more appropriate solution.

    Change-Id: Ib20c4f892df68f7112d969d801a18a1a5bfbd474
    Related-Bug: #1288586

Kiall Mac Innes (kiall) on 2014-04-15
Changed in designate:
status: New → Triaged
tags: added: havana-backport-potential
Alan Pevec (apevec) on 2014-05-01
tags: removed: havana-backport-potential

Reviewed: https://review.openstack.org/91684
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=58de9e6415f5bdabde708c8584b21b59b7e96a88
Submitter: Jenkins
Branch: stable/havana

commit 58de9e6415f5bdabde708c8584b21b59b7e96a88
Author: Steve Baker <email address hidden>
Date: Wed Apr 2 13:22:45 2014 +1300

    Disable check_uptodate.sh check in pep8

    Running generate_sample.sh currently produces an invalid heat.conf.sample
    due to bug #1288586.

    This change disables the check_uptodate.sh in the tox pep8 so that the
    gate-heat-pep8 job passes while we find a more appropriate solution.

    Related-Bug: #1288586
    (cherry picked from commit 79d8191c75e3dc5578686fdb68158cae36760641)

    Conflicts:
     tox.ini

    Change-Id: Ib20c4f892df68f7112d969d801a18a1a5bfbd474

tags: added: in-stable-havana

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

Changed in heat:
assignee: nobody → Thomas Herve (therve)
status: Triaged → In Progress
Doug Hellmann (doug-hellmann) wrote :

Does using entry points solve this problem?

Reviewed: https://review.openstack.org/95178
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=52ad1edea2bb6f4209879064488d1bafb6eaef13
Submitter: Jenkins
Branch: master

commit 52ad1edea2bb6f4209879064488d1bafb6eaef13
Author: Thomas Herve <email address hidden>
Date: Tue May 20 10:45:51 2014 +0200

    Use entry points for config generation

    This starts using entry points to generate configuration for the
    common.config and the common.wsgi modules, as they use entries with the
    same name in different groups.
    This also removes configuration for sslutils which is unused, and
    re-enable the check for up-to-date configuration.

    Co-Authored-By: <email address hidden>
    Closes-Bug: #1288586
    Change-Id: If48c62bbb2b1fb641791dad56f7f905e483080fa

Changed in heat:
status: In Progress → Fix Committed
Zane Bitter (zaneb) wrote :

Using entry points solves the immediate problem for Heat by allowing us to ignore the options we don't want. The underlying issue is still there, though.

Doug Hellmann (doug-hellmann) wrote :

OK, the underlying issue is really a change in the way options are being used now vs. when oslo.config and the config generator were conceived. If entry points makes it possible to reuse options in multiple sections for the config generator, then I'm going to count this as closed.

Changed in oslo:
status: Triaged → Fix Committed
Thierry Carrez (ttx) on 2014-06-11
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-06-12
Changed in oslo:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-10-16
Changed in heat:
milestone: juno-1 → 2014.2
Kiall Mac Innes (kiall) on 2014-12-03
no longer affects: designate
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers