Glance ignores a headers when created artifact

Bug #1490976 reported by Darja Shakhray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Darja Shakhray

Bug Description

ENVIRONMENT: devstack, Glance (master, 31.08.2015)

STEPS TO REPRODUCE:

1) curl -H "X-Auth-Token: 3b4e028c1e6f457595497afc1df37ffb" -H "bla-bla" POST -d '{"name": "name1", "version": "2"}' http://172.18.76.44:9292/v3/artifacts/myartifact/v2.0/drafts -i

2)curl -H "X-Auth-Token: 3b4e028c1e6f457595497afc1df37ffb" POST -d '{"name": "name1", "version": "2"}' http://172.18.76.44:9292/v3/artifacts/myartifact/v2.0/drafts -i

EXPECTED RESULT:
status code 400 and message error

ACTUAL RESULT:
Artifact is created

curl: (6) Could not resolve host: POST
HTTP/1.1 201 Created
Content-Length: 512
Content-Type: application/json; charset=UTF-8
Location: http://172.18.76.44:9292/v3/artifacts/myartifact/v2.0/91671992-c84e-4723-9024-3c9b6dddf079
X-Openstack-Request-Id: req-8d193d56-1e24-48cf-a409-82a016d443b8
Date: Tue, 01 Sep 2015 13:02:40 GMT

{"description": null, "published_at": null, "tags": [], "depends_on": null, "created_at": "2015-09-01T13:02:40.000000", "type_name": "MyArtifact", "updated_at": "2015-09-01T13:02:40.000000", "visibility": "private", "id": "91671992-c84e-4723-9024-3c9b6dddf079", "type_version": "2.0", "state": "creating", "version": "2.0.0", "references": [], "prop1": null, "prop2": null, "owner": "e883b496995f42e988e9c6c07c16d2da", "image_file": null, "deleted_at": null, "screenshots": [], "int_list": null, "name": "name1"}

Tags: artifacts
Changed in glance:
assignee: nobody → dshakhray (dshakhray)
tags: added: artifacts
Revision history for this message
Niall Bunting (niall-bunting) wrote :

https://bugs.launchpad.net/glance/+bug/1490979 see my description there. Is that the reason this is not working? (no -X)

Revision history for this message
Darja Shakhray (dshakhray) wrote :

Niall, the result is the same

curl -H "X-Auth-Token: c50d426620c848c5a0a15d498d25e6c1" -X POST -d '{"name": "name1", "version": "2"}' http://172.18.76.44:9292/v3/artifacts/myartifact/v2.0/drafts -i
HTTP/1.1 201 Created
Content-Length: 512
Content-Type: application/json; charset=UTF-8
Location: http://172.18.76.44:9292/v3/artifacts/myartifact/v2.0/502a8399-ec64-4673-91b0-b2173ada9aa1
X-Openstack-Request-Id: req-315be97c-9687-406a-b913-d0bc18db0382
Date: Tue, 01 Sep 2015 15:10:11 GMT

{"description": null, "published_at": null, "tags": [], "depends_on": null, "created_at": "2015-09-01T15:10:11.000000", "type_name": "MyArtifact", "updated_at": "2015-09-01T15:10:11.000000", "visibility": "private", "id": "502a8399-ec64-4673-91b0-b2173ada9aa1", "type_version": "2.0", "state": "creating", "version": "2.0.0", "references": [], "prop1": null, "prop2": null, "owner": "e883b496995f42e988e9c6c07c16d2da", "image_file": null, "deleted_at": null, "screenshots": [], "int_list": null, "name": "name1"}

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

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

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

commit f68b3b176c9e4776d3c6e354f64f8272daabd1ac
Author: Darja Shakhray <email address hidden>
Date: Fri Sep 4 14:56:26 2015 +0300

    Fix glance ignored a headers when created artifact

    Added check validate header when created, updated artifacts
    and uploaded blob.

    ApiImpact
    FastTrack

    Change-Id: Iedea97f708b0bb9706e1e1b13caef6572df92cca
    Closes-bug: #1490976

Changed in glance:
status: In Progress → Fix Released
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.