Ask Your Question
0

Getting wrong http response in glance?

asked 2013-12-10 09:23:29 -0500

anusha-rayani-7 gravatar image

On issuing the command "curl -i -X GET -H "Content-Type: application/json" -H "X-Auth-Token: $AUTH_TOKEN" http://localhost:9292/v1/images/a525bf24-fd61-43d3-ab2f-7847ba81f845/file%22 (http://localhost:9292/v1/images/a525b...) . Here as expected I should get a 204 response ( http://docs.openstack.org/api/openstack-image-service/2.0/content/get-image-file.html (http://docs.openstack.org/api/opensta...) ) .Instead I am getting http 404 error as follows ::

HTTP/1.1 404 Not Found Content-Length: 154 Content-Type: text/html; charset=UTF-8 X-Openstack-Request-Id: req-72563706-3247-49cf-8c4b-03ca46b30333 Date: Tue, 10 Dec 2013 14:43:36 GMT

<html> <head> <title>404 Not Found</title> </head> <body>

404 Not Found

The resource could not be found.

</body>

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2013-12-11 18:33:00 -0500

Hi Anusha, you are using two differnts version of the API

Your request is done on API v1

http://localhost:9292/v1/images/a525bf24-fd61-43d3-ab2f-7847ba81f845/file (http://localhost:9292/v1/images/a525b...)

When the documentation you are refering to is made on v2 of the API.

In v1 the /images/{image}/file endpoint does not exist thus the 404.

Hope it helps,


Yanis Guenane

edit flag offensive delete link more
0

answered 2013-12-11 18:40:47 -0500

To do what you are actually trying to accomplish, download the image. Simply run a GET against /images/{id}

curl -i -X GET -H 'X-Auth-Token: YOURTOKEN' -H 'Content-Type: application/octet-stream' -H 'User-Agent: python-glanceclient' http://127.0.0.1:9292/v1/images/%7Bimageid%7D (http://127.0.0.1:9292/v1/images/{imag...)

edit flag offensive delete link more
0

answered 2013-12-12 06:22:16 -0500

anusha-rayani-7 gravatar image

If I have used same version of api also ,404 error got reflected. curl -i -X GET -H "Content-Type: application/json" -H "X-Auth-Token: $AUTH_TOKEN" http://localhost:9292/v2/images/ffb8790f-3229-4ff9-b4f3-ff345c13a32d/file (http://localhost:9292/v2/images/ffb87...) . HTTP/1.1 404 Not Found Content-Length: 176 Content-Type: text/html; charset=UTF-8 X-Openstack-Request-Id: req-acd3223d-8c51-4ff5-bf0a-4b94f5944e82 Date: Thu, 12 Dec 2013 11:46:36 GMT

<html> <head> <title>404 Not Found</title> </head> <body>

404 Not Found

An object with the specified identifier was not found.

</body>

edit flag offensive delete link more
0

answered 2013-12-12 14:38:13 -0500

The error message says it all

An object with the specified identifier was not found

Make sure the id you are inputing matchs the id of the image and not owner id by mistake.

The call to /image/{image_id}/file in v2 does work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-12-10 09:23:29 -0500

Seen: 106 times

Last updated: Dec 12 '13