placement needs to stop using accept.best_match from webob it is deprecated

Bug #1773225 reported by Chris Dent on 2018-05-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Chris Dent

Bug Description

Modern webob has improved its management of accept headers to be more in alignment with the HTTP RFCs (see bug ), deprecating their old handling:

DeprecationWarning: The behavior of AcceptValidHeader.best_match is currently being maintained for backward compatibility, but it will be deprecated in the future, as it does not conform to the RFC.

Eventually placement (in nova.api.openstack.placement.util:check_accept) should be updated to use the new way.

Creating a separate bug to be task oriented.

Fix proposed to branch: master

Changed in nova:
assignee: nobody → Chris Dent (cdent)
status: Triaged → In Progress

Submitter: Zuul
Branch: master

commit 450444a7829506f5539bf25ecf6cee1c5d82c48d
Author: Chris Dent <email address hidden>
Date: Wed Jun 13 15:16:35 2018 +0100

    [placement] replace deprecated accept.best_match

    Webob has deprecated the best_match[1] method on accept headers and now
    spews warnings when it sees it.

    This change fixes it by using the equivalent (but more correct with
    regard to the relevant RFCs[2]) acceptable_offers[3] method.

    Existing unit tests in placement/ cover this change.


    Change-Id: Ie4d81fa178b3ed6b2a7b450b4978009486f07810
    Closes-Bug: #1773225

Changed in nova:
status: In Progress → Fix Released

Submitter: Zuul
Branch: master

commit c4e0ad14333f00e464826921d8b7a7e53e2c30c9
Author: Sylvain Bauza <email address hidden>
Date: Fri Jun 29 11:44:23 2018 +0200

    Fix placement incompatible with webob 1.7

    In Ie4d81fa178b3ed6b2a7b450b4978009486f07810 we started using a new WebOb API
    for introspecting headers but since this new API isn't supported by older
    versions than 1.8, we need to only accept 1.8.1 or 1.8.2 for Nova
    (because 1.8.0 was having a bug fixed by 1.8.1 at least).

    Change-Id: I345f372815aef5ac0fb6fc607812ce81587734bf
    Closes-Bug: #1773225

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers