nova image snapshots fail with 'Invalid disk format'

Bug #937216 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Eoghan Glynn

Bug Description

Using Glance Essex 62c913c3ad4db1a03461f51304fac885196df8ca with Nova.

When I try to create an image snapshot in nova I'm now getting the following error message:

2012-02-20 20:09:02 9338 ERROR [glance.api.v1.images] Failed to add image metadata. Got error: Data supplied was not valid. Details: Invalid disk format 'None' for image.

Dan Prince (dan-prince)
Changed in glance:
status: New → In Progress
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → High
Revision history for this message
Dan Prince (dan-prince) wrote :

Bit of background....

In nova API we create an image record before we have access to the disk/container formats... The disk and container format get set when the compute manager uploads the image. So... I'm not sure we can require these formats to exist when creating images in Glance.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Two ways to fix this:

1) make sure we know disk/container format when we register the image
2) force glance to accept undefined disk/container format without throwing an error or providing a default

Option 2 might be our only sensible solution at this point, as I don't think we can standardize on snapshot formats yet

Eoghan Glynn (eglynn)
Changed in glance:
assignee: Dan Prince (dan-prince) → Eoghan Glynn (eglynn)
milestone: none → essex-4
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/4330

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

Reviewed: https://review.openstack.org/4330
Committed: http://github.com/openstack/glance/commit/5f3137133054284ced41d3e6702e1dad4591c9c7
Submitter: Jenkins
Branch: master

commit 5f3137133054284ced41d3e6702e1dad4591c9c7
Author: Eoghan Glynn <email address hidden>
Date: Mon Feb 20 21:49:17 2012 +0000

    disk/container_format required on image activate

    Fixes lp 937216

    The initial change[1] to require the container and disk formats be
    explicitly set was enforced on the initial image POST, regardless
    of whether the image content accompanied that request (either in
    as the entity-body, or externally specified via x-image-meta-location).

    This turned out to be overly restrictive, as these formats may not
    be known to the caller until the image content is supplied via a
    subsequent PUT on the new image.

    Now we only enforce the strict requirement for these formats to be
    non-empty when the image is activated (as opposed to the initial
    enqueue).

    [1] https://github.com/openstack/glance/commit/62c913c3

    Change-Id: I89e068f35fd7da427b547b18cdea4ae84ab3ec87

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: essex-4 → 2012.1
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.