v1: Updates using x-image-meta-id header provoke E500 or 200

Bug #1483353 reported by Stuart McLaren
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Niall Bunting
Liberty
Fix Committed
Medium
Flavio Percoco

Bug Description

$ curl -v -X PUT http://127.0.0.1:9292/v1/images/8aa1f62d-73f2-4ed7-8d4c-b66407abd439 -H 'X-Auth-Token: 7535a1be77e3459e8e4928aae02a8042' -H 'x-image-meta-id: fd6db2fa-9c9d-4105-aa3b-657914593de8'
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 9292 (#0)
> PUT /v1/images/8aa1f62d-73f2-4ed7-8d4c-b66407abd439 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:9292
> Accept: */*
> X-Auth-Token: 7535a1be77e3459e8e4928aae02a8042
> x-image-meta-id: fd6db2fa-9c9d-4105-aa3b-657914593de8
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Content-Length: 0
< Date: Mon, 10 Aug 2015 17:00:00 GMT
< Connection: close
<
* Closing connection 0

and

$ curl -v -X PUT http://127.0.0.1:9292/v1/images/8aa1f62d-73f2-4ed7-8d4c-b66407abd439 -H 'X-Auth-Token: 7535a1be77e3459e8e4928aae02a8042' -H 'x-image-meta-id: fd6db2fa-9c9d-4105-aa3b-657914593de8'
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 9292 (#0)
> PUT /v1/images/8aa1f62d-73f2-4ed7-8d4c-b66407abd439 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:9292
> Accept: */*
> X-Auth-Token: 7535a1be77e3459e8e4928aae02a8042
> x-image-meta-id: fd6db2fa-9c9d-4105-aa3b-657914593de8
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Content-Length: 0
< Date: Mon, 10 Aug 2015 17:00:00 GMT
< Connection: close
<
* Closing connection 0

Should return 403

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

It probably makes sense to return 403 here.

Changed in glance:
assignee: nobody → Niall Bunting (niall-bunting)
Revision history for this message
Niall Bunting (niall-bunting) wrote : Re: v1: incorrect x-image-meta-id header provokes E500

I have separated the two bugs out Stuart. This is now the incorrect case.

description: updated
summary: - v1: x-image-meta-id header provokes E500
+ v1: incorrect x-image-meta-id header provokes E500
description: updated
description: updated
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/211636

Changed in glance:
status: New → In Progress
summary: - v1: incorrect x-image-meta-id header provokes E500
+ v1: Updates using x-image-meta-id header provoke E500 or 200
description: updated
Changed in glance:
milestone: none → mitaka-1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/249392

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

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

commit be0a27082b53c85f47d3c82ef852f285d975f9b8
Author: NiallBunting <email address hidden>
Date: Tue Aug 11 15:32:34 2015 +0000

    V1: Stop id changes after the image creation

    Currently in v1 if someone tries to update the ID after the image is
    created it will cause a 500 to be returned (or if updating to the same
    ID a 200). This now returns a 403.

    ApiImpact

    Change-Id: Ibb40632f027b2b84f88aaf0a971a0f18de350187
    Closes-Bug: 1483353
    Closes-Bug: 1483688

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

Reviewed: https://review.openstack.org/249392
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=830a0ec0176d599f476678c4f54ae1cb61866441
Submitter: Jenkins
Branch: stable/liberty

commit 830a0ec0176d599f476678c4f54ae1cb61866441
Author: NiallBunting <email address hidden>
Date: Tue Aug 11 15:32:34 2015 +0000

    V1: Stop id changes after the image creation

    Currently in v1 if someone tries to update the ID after the image is
    created it will cause a 500 to be returned (or if updating to the same
    ID a 200). This now returns a 403.

    ApiImpact

    Change-Id: Ibb40632f027b2b84f88aaf0a971a0f18de350187
    Closes-Bug: 1483353
    Closes-Bug: 1483688
    (cherry picked from commit be0a27082b53c85f47d3c82ef852f285d975f9b8)

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/glance 12.0.0.0b1

This issue was fixed in the openstack/glance 12.0.0.0b1 development milestone.

Changed in glance:
status: Fix Committed → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/glance 11.0.1

This issue was fixed in the openstack/glance 11.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/glance 11.0.1 release.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.