Pike 'versions' response includes 2.6 even when image import is not enabled

Bug #1711829 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Brian Rosmaita

Bug Description

The bug is that the 'versions' response shows the EXPERIMENTAL 2.6 version even when enable_image_import=False.

This is why it's a bug. There are a series of changes [0] in RC-2 to make sure that when image import is not enabled, the /v2 responses to v2.6 calls are the same as what you'd see in v2.5, that is, 404 for:

/v2/images/{image_id}/stage
/v2/images/{image_id}/import
/v2/info/import

and the OpenStack-image-import-methods header is not included on POST /v2/images .

That being the case, we should not advertise the availability of 2.6 for a Glance in the default configuration (that is, configured with enable_image_import=False). The calls won't 500 or anything, but showing 2.6 as available will confuse consumers (and possibly deployers testing their API nodes).

[0] These patches:
https://review.openstack.org/#/c/491249/
https://review.openstack.org/#/c/494544/
https://review.openstack.org/#/c/494036/

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

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

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

Reviewed: https://review.openstack.org/495512
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d3871a57b895902432bc7ddb98f9bb757cc2502b
Submitter: Jenkins
Branch: master

commit d3871a57b895902432bc7ddb98f9bb757cc2502b
Author: Brian Rosmaita <email address hidden>
Date: Sat Aug 19 13:00:20 2017 -0400

    Fix Image API 'versions' response

    Whether or not the v2.6 EXPERIMENTAL API is exposed at a site
    depends on the enable_image_import config value. If it's False
    (the default), then the API a client sees is the CURRENT v2.5
    API, and any of the v2.6 calls made against 2.5 return a 404
    (same as if you were running Ocata). This patch adjusts the
    'versions' response so that when enable_image_import=False,
    the EXPERIMENTAL v2.6 does not appear in the response.

    Change-Id: Ibe164f02c99d10f5a5edd0de96c665413a12f700
    Closes-bug: #1711829

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/495907

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/pike)

Reviewed: https://review.openstack.org/495907
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=fc65a9ef9c65d63d16e0b1e4b8ed952fe327b84d
Submitter: Jenkins
Branch: stable/pike

commit fc65a9ef9c65d63d16e0b1e4b8ed952fe327b84d
Author: Brian Rosmaita <email address hidden>
Date: Sat Aug 19 13:00:20 2017 -0400

    Fix Image API 'versions' response

    Whether or not the v2.6 EXPERIMENTAL API is exposed at a site
    depends on the enable_image_import config value. If it's False
    (the default), then the API a client sees is the CURRENT v2.5
    API, and any of the v2.6 calls made against 2.5 return a 404
    (same as if you were running Ocata). This patch adjusts the
    'versions' response so that when enable_image_import=False,
    the EXPERIMENTAL v2.6 does not appear in the response.

    Change-Id: Ibe164f02c99d10f5a5edd0de96c665413a12f700
    Closes-bug: #1711829
    (cherry picked from commit d3871a57b895902432bc7ddb98f9bb757cc2502b)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 15.0.0.0rc2

This issue was fixed in the openstack/glance 15.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 16.0.0.0b1

This issue was fixed in the openstack/glance 16.0.0.0b1 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.