Got error if create image with v2 and update it with v1

Bug #1258160 reported by Feilong Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Yanis Guenane

Bug Description

When I was test something, I create an empty image with v2 by:
glance --os-image-api-version 2 image-create

And then I update it with v1 like:
glance image-update 82a0c149-7e3e-471b-921f-0df1ad780722 --name flwang_c_1 --disk-format raw --container-format bare

Then there will be an error as below though the update successfully.
int() argument must be a string or a number, not 'NoneType'

Changed in glance:
assignee: nobody → Yanis Guenane (yanis-guenane)
Revision history for this message
Yanis Guenane (yanis-guenane) wrote :

After tracking down the issue, the problem come from the fact that

* In v2: image_meta['size'] is None
* In v1: image_meta['size'] is 0

Feilong Wang (flwang)
Changed in glance:
status: New → Triaged
importance: Undecided → Low
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/62259

Changed in glance:
status: Triaged → In Progress
Revision history for this message
Yanis Guenane (yanis-guenane) wrote :
Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-3 → 2014.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.