Servers created using a image bookmark link as the imageRef end up in ERROR status

Bug #913545 reported by Daryl Walleck on 2012-01-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Alex Meade

Bug Description

In testing, I noticed that if I pass an image's bookmark link as the imageRef parameter when creating a server, the server will always end up in ERROR status. Here's an example reproducing what I'm reporting:

curl -i -X POST -d '{"server" : { "name" : "test1", "imageRef" : "http://localhost:8774/15/images/4040a2b0-6814-413a-8139-a8b7ed30bd4e","flavorRef" : "1"}}' http://localhost:8774/v1.1/15/servers -H "Content-Type: application/json" -H "X-Auth-Token: 3d5615d2-89bd-44a6-943c-bebfcb9d5884"

HTTP/1.1 202 Accepted
Location: http://localhost:8774/v1.1/15/servers/b2c2db4c-7e64-4cd6-8cba-f40004cddebb
Content-Type: application/json
Content-Length: 365
Date: Sun, 08 Jan 2012 21:13:44 GMT
Connection: close

{"server": {"id": "b2c2db4c-7e64-4cd6-8cba-f40004cddebb", "links": [{"href": "http://localhost:8774/v1.1/15/servers/b2c2db4c-7e64-4cd6-8cba-f40004cddebb", "rel": "self"}, {"href": "http://localhost:8774/15/servers/b2c2db4c-7e64-4cd6-8cba-f40004cddebb", "rel": "bookmark"}], "adminPass": "7CsT9BnwYdXs"}}

curl -i http://localhost:8774/v1.1/15/servers/b2c2db4c-7e64-4cd6-8cba-f40004cddebb -H "X-Auth-Token: 3d5615d2-89bd-44a6-943c-bebfcb9d5884"

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1087
Date: Sun, 08 Jan 2012 21:15:29 GMT
Connection: close

{"server": {"status": "ERROR", "updated": "2012-01-08T21:14:24Z", "hostId": "3a1f0808756987979ab6f22d29dd1c8592c37bbcf0936bf667c91234", "user_id": "dwalleck", "name": "test1", "links": [{"href": "http://localhost:8774/v1.1/15/servers/b2c2db4c-7e64-4cd6-8cba-f40004cddebb", "rel": "self"}, {"href": "http://localhost:8774/15/servers/b2c2db4c-7e64-4cd6-8cba-f40004cddebb", "rel": "bookmark"}], "created": "2012-01-08T21:13:44Z", "fault": {"message": "Failure", "code": 500, "details": "", "created": "2012-01-08T21:14:24Z"}, "image": {"id": "4040a2b0-6814-413a-8139-a8b7ed30bd4e", "links": [{"href": "http://localhost:8774/15/images/4040a2b0-6814-413a-8139-a8b7ed30bd4e", "rel": "bookmark"}]}, "metadata": {}, "accessIPv4": "", "accessIPv6": "", "tenant_id": "15", "flavor": {"id": "1", "links": [{"href": "http://localhost:8774/15/flavors/1", "rel": "bookmark"}]}, "config_drive": "", "id": "b2c2db4c-7e64-4cd6-8cba-f40004cddebb", "key_name": "", "addresses": {}}}

Dan Prince (dan-prince) wrote :

I don't think fully qualified imageRef's have worked since we put in the UUID changes early in Essex.

See this related ticket about rebuilds failing for the same reason:

Daryl Walleck (dwalleck) wrote :

Actually this seems to be limited to the bookmark version of an image ref. The full self ref works just fine if I plug it in. I suspect the API is having trouble locating the image without the version number. I tried also including an accept header, but still had the same result.

Thierry Carrez (ttx) on 2012-01-13
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Alex Meade (alex-meade) wrote :

2012-01-23 18:32:07 DEBUG [eventlet.wsgi.server] - - [23/Jan/2012 18:32:07] "GET /v1/images/http://localhost:8774/2/images/1fd42e95-2b38-4803-bf1e-d82ac9c42384 HTTP/1.1" 404 194 0.342494

it doesnt know its a bookmark link and thus tries to do the above

Changed in nova:
assignee: nobody → Alex Meade (alex-meade)
status: Confirmed → In Progress

Submitter: Jenkins
Branch: master

commit 48c275da1271f47b43e1270a3bdd99c7e20dd122
Author: Alex Meade <email address hidden>
Date: Mon Jan 23 21:30:20 2012 +0000

    Instances to be created with a bookmark link

    Fixes bug 913545

    Change-Id: I6401a631211d76a8942d3435fb7dd463630cac7a

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers