Glance V1 API documentation inaccuracy

Bug #1124224 reported by John Lenihan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Paul Bourke

Bug Description

According to the V1 Glance API docs at http://docs.openstack.org/developer/glance/glanceapi.html#add-a-new-image if I am adding a new image the headers 'x-image-meta-disk_format' and 'x-image-meta-container_format' are optional. However using the latest glance devstack environment an attempt to create a new image will fail if I do not specify these headers.

If the above headers are not present the API throws a 400 Bad Request with message either "Invalid disk format 'None' for image." if the x-image-meta-disk_format header is missing, or else "Invalid container format 'None' for image." if the x-image-meta-container_format header is missing.

Tags: docs
Revision history for this message
Anita Kuno (anteaya) wrote :

I can confirm that 'x-image-meta-container_format' is required to add an image in addition to 'x-image-meta-name' which is identified as necessary in the linked documentation.

I am able to add an image using cURL that does not pass the 'x-image-meta-disk_format'.

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

You can create an image without disk/container formats if you do not upload image data. If you are uploading that image data, you must set both container and disk_format. I think this fact should be added to the doc page to solve this bug.

Changed in glance:
status: New → Confirmed
importance: Undecided → Low
milestone: none → grizzly-rc1
Changed in glance:
assignee: nobody → Brian Waldon (bcwaldon)
Changed in glance:
milestone: grizzly-rc1 → none
tags: added: docs grizzly-rc-potential
Thierry Carrez (ttx)
tags: added: grizzly-backport-potential
removed: grizzly-rc-potential
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/30724

Changed in glance:
assignee: Brian Waldon (bcwaldon) → Paul Bourke (pauldbourke)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/30724
Committed: http://github.com/openstack/glance/commit/02fc5ba589df74d4404fee6fd6dc897e06c7d886
Submitter: Jenkins
Branch: master

commit 02fc5ba589df74d4404fee6fd6dc897e06c7d886
Author: Paul Bourke <email address hidden>
Date: Mon May 27 16:08:42 2013 +0000

    Add documentation on reserving a Glance image

    This lets us refer to the fact that some optional headers are in fact
    required unless reserving an image.

    Fixes bug 1124224

    Change-Id: I5646d4dc130efecf991573b363eb1a665012b7df

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: havana-2 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
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.