placement gabbi tests that manipulate microversion can intermittently fail

Bug #1728934 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Dent

Bug Description

If a gabbi file sets a default microversion by setting a header 'OpenStack-API-Version' with a value like 'placement latest' and then later overrides that in an individual test with a header of 'openstack-api-version' the difference in case can lead to failure.

In the best case the failure is consistent.

In the worst case it can sometimes work, because the header shows up twice in the request, and the last header wins.

The solution is to always use the same case through the file.

Note that gabbi is case sensitive here in part because of the implementation but also because it provides control and possibility to test exactly this problem.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/516662
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f974e3c3566f379211d7fdc790d07b5680925584
Submitter: Zuul
Branch: master

commit f974e3c3566f379211d7fdc790d07b5680925584
Author: Chris Dent <email address hidden>
Date: Tue Oct 31 12:54:17 2017 +0000

    [placement] avoid case issues microversions in gabbits

    If a gabbi file sets a default microversion by setting a header
    'OpenStack-API-Version' with a value like 'placement latest' and then
    later overrides that in an individual test with a header of
    'openstack-api-version' the difference in case can lead to failure.

    In the best case the failure is consistent.

    In the worst case it can sometimes work, because the header shows up
    twice in the request, and the last header wins, order in the headers
    and the resulting list dependent on the vagrancies of python ordering.

    The solution is to always use the same case, so this change updates
    all use to be lowercase, to establish a precedent that future people
    will be able to use as an example.

    Note that gabbi is case sensitive here in part because of the
    implementation but also because it provides the control and possibility
    to test exactly this problem.

    Change-Id: I1e89e231cf0d46d211d360cda091b33520f85027
    Closes-Bug: #1728934

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0b2

This issue was fixed in the openstack/nova 17.0.0.0b2 development milestone.

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.