OS API v1.1 'Cannot find requested image' errors when creating instance

Bug #882658 reported by Dan Prince on 2011-10-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Brian Waldon

Bug Description

Using nova 78025e8 or later with the most recent glance commit ceab6b3 (image ids --> image refs).

I'm getting the following failures when trying to use the OSAPI to create an instance:

REQUEST: POST => /v1.1/admin/servers

RESPONSE: {"badRequest": {"message": "Cannot find requested image a07f08e5-025b-4c8c-8624-f2a60fcdc640: Invalid image href a07f08e5-025b-4c8c-8624-f2a60fcdc640.", "code": 400}}

Dan Prince (dan-prince) on 2011-10-27
Changed in nova:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Dan Prince (dan-prince)
Brian Waldon (bcwaldon) wrote :

Please deploy this code to nova and tell me if you can still reproduce the bug: https://review.openstack.org/#change,988

Dan Prince (dan-prince) wrote :

In order to boot instances with the OSAPI I need just this change in image/glance.py:

+++ b/nova/image/glance.py
@@ -54,7 +54,7 @@ def _parse_image_ref(image_href):
     o = urlparse(image_href)
     port = o.port or 80
     host = o.netloc.split(':', 1)[0]
- image_id = int(o.path.split('/')[-1])
+ image_id = o.path.split('/')[-1]
     return (image_id, host, port)

Dan Prince (dan-prince) wrote :

Waldon. Looking at the S3 branch again now. I looked at that a week ago and didn't realize it encompassed the change needed for the OSAPI as well.

Dan Prince (dan-prince) wrote :

Okay. I pushed an isolated fix for the glance href issue here:


This resolves my issue booting instances w/ the OSAPI. My preference would be to fix that first and then look at the S3 issues separately.

Dan Prince (dan-prince) wrote :

Sounds like we have a bit of a standoff on this one. Removing myself as the assignee.

Changed in nova:
assignee: Dan Prince (dan-prince) → nobody

Reviewed: https://review.openstack.org/988
Committed: http://github.com/openstack/nova/commit/c13e7f79e52325792a130a578a74a170c01dc747
Submitter: Jenkins
Branch: master

 status fixcommitted

commit c13e7f79e52325792a130a578a74a170c01dc747
Author: Brian Waldon <email address hidden>
Date: Wed Oct 19 15:02:48 2011 -0400

    Creating uuid -> id mapping for S3 Image Service

    This creates a mapping of Glance uuids to preserve the
    EC2-specific image id format. This adds a lazily generated
    mapping layer that is stored in the database.

    This also fixes bug 882658

    Change-Id: I64bf6c7297b97f206b967781a28791aa3874ca81

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2011-11-09
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx) on 2011-11-17
Changed in nova:
status: Fix Committed → Fix Released
Mark McLoughlin (markmc) on 2012-04-03
Changed in nova:
assignee: nobody → Brian Waldon (bcwaldon)
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers