v2 API image-list fails when images with null checksum

Bug #1034790 reported by IWAMOTO Toshihiro on 2012-08-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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.

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) on 2012-08-10
no longer affects: python-glanceclient
Changed in glance:
status: New → In Progress
assignee: nobody → Brian Waldon (bcwaldon)
importance: Undecided → High
milestone: none → folsom-3

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
IWAMOTO Toshihiro (iwamoto) wrote :

I confirmed that the problem has gone. Thanks.

Thierry Carrez (ttx) on 2012-08-15
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in glance:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers