import-info should return 404 when import is not enabled

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

Bug Description

The 2.5 API is going to remain CURRENT in Pike, with the 2.6 API (with image import refactor) as EXPERIMENTAL. With Pike RC-1, if you make these calls with enable_image_import = False, you get a 404, just as you do with stable/ocata:

PUT v2/images/{image_id}/stage
POST v2/images/{image_id}/import

and, with enable_image_import = False, the OpenStack-image-import-methods header is NOT returned at all in a Pike RC-1 response (which is correct).

The GET v2/info/import call, however, in Pike RC-1 with enable_image_import = False returns a 200 with this body:

{"import-methods": {"type": "array", "description": "Import methods available.", "value": []}}

The content is correct, but stable/ocata returns a 404 for this. In order to make the claim that with enabled_image_import = False, you're running 2.5, this should return a 404 in Pike.

Changed in glance:
assignee: nobody → Brian Rosmaita (brian-rosmaita)
description: updated
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/494544
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=692dc040872e04d27469570a508018c44f8d88ef
Submitter: Jenkins
Branch: master

commit 692dc040872e04d27469570a508018c44f8d88ef
Author: Brian Rosmaita <email address hidden>
Date: Thu Aug 17 09:18:20 2017 -0400

    Return 404 for import-info call

    Change the response to GET v2/info/import to be a 404 when Glance is
    configured with enable_image_import = False so that the response is
    consistent with the v2.5 API. See the bug for details.

    Change-Id: Ib56b600dbf53672bcaa4fd959adb736de4cdff50
    Closes-bug: #1711362

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/495790

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

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

commit c8873ccc18f1847e92a90e1ece03a15a4d40712d
Author: Brian Rosmaita <email address hidden>
Date: Thu Aug 17 09:18:20 2017 -0400

    Return 404 for import-info call

    Change the response to GET v2/info/import to be a 404 when Glance is
    configured with enable_image_import = False so that the response is
    consistent with the v2.5 API. See the bug for details.

    Change-Id: Ib56b600dbf53672bcaa4fd959adb736de4cdff50
    Closes-bug: #1711362
    (cherry picked from commit 692dc040872e04d27469570a508018c44f8d88ef)

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.