v2 API image-list fails when images with null checksum

Bug #1034790 reported by IWAMOTO Toshihiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Brian Waldon

Bug Description

After registering a glance image with POST http://glance-host:9292/v2/images,
$ glance --os-image-api-version 2 image-list
produces no output.

This is because the glance server reports the image without data has "null" checksum.
As the schema says checksums have "string" type, it is probably causing warlock schema validation error in glanceclient.

I think glance should return an empty string instead of "null" as checksum in this case.

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

Definitely reproducible. I'll tackle this one once I figure which side of the request it needs to be addressed on.

summary: - v2 API image-list fails when images without data exist
+ v2 API image-list fails when images with null checksum
Brian Waldon (bcwaldon)
no longer affects: python-glanceclient
Changed in glance:
status: New → In Progress
assignee: nobody → Brian Waldon (bcwaldon)
importance: Undecided → High
milestone: none → folsom-3
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/11199

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

Reviewed: https://review.openstack.org/11199
Committed: http://github.com/openstack/glance/commit/92b17a0d100d2d739c0f73eb58e87fd749fc71a8
Submitter: Jenkins
Branch: master

commit 92b17a0d100d2d739c0f73eb58e87fd749fc71a8
Author: Brian Waldon <email address hidden>
Date: Fri Aug 10 14:59:56 2012 -0700

    Filter out None values from v2 API image entity

    Prevent core image attributes with None values from being returned
    to v2 API clients. Most attribute schemas are of type 'string' and
    returning None is invalid.

    Fixes bug 1034790

    Change-Id: I2885cabf14307e46ff711bdabfcd3ff3253e6628

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
IWAMOTO Toshihiro (iwamoto) wrote :

I confirmed that the problem has gone. Thanks.

Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-3 → 2012.2
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.