glance checked_iter missing variable in error case, mixed type of expected_size
Bug #885696 reported by
Tom Hancock
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Medium
|
Tom Hancock |
Bug Description
Two issues wrt checked_iter() function in api/v1/images.py
The error message raised by IOError needs %locals() added to it
If there is no cache in the pipeline image_meta['size'] appears to be of type str on my system. Thus the compare of expected_size and bytes_written always failed even when the values should have matched.
Unconditionally converting expected_size to int is one way to temporarily resolve this.
Curiously image_meta['size'] is of type int if the cache is in the pipeline.
Changed in glance: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Tom Hancock (tom-hancock) |
milestone: | none → essex-1 |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | essex-1 → 2012.1 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/1289 github. com/openstack/ glance/ commit/ 2674e8bbbcd340d 2161c08d272b57a cd18684eb8
Committed: http://
Submitter: Jenkins
Branch: master
status fixcommitted
done
commit 2674e8bbbcd340d 2161c08d272b57a cd18684eb8
Author: Tomas Hancock <email address hidden>
Date: Thu Nov 3 12:07:34 2011 +0000
Fix LP Bug#885696 two issues with checked_iter
The error message raised by IOError needed %locals() added
If there is no cache in the pipeline image_meta['size'] appears to be of nally convert expected_size to int to resolve this.
type str on my system. Thus the compare of expected_size and bytes_written
always failed even when the values should have matched.
Unconditio
Curiously image_meta['size'] is of type int if the cache is in the pipeline.
This latter fix could be removed if the typing is resolved
Change-Id: I05eadce2b5ceb8 eb7939acb41668a ff089270e21