Glance Image Limit is 2^32 on 32bit Systems
Bug #739433 reported by
Donal Lafferty
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Jay Pipes |
Bug Description
Glance uses plain integers to record the image size. On 32-bit machines, this limits the max image size to approximately 2 gigs. The image size may be larger on 64-bit systems.
E.g. in http://
def _image_
...
if 'size' in values:
Related branches
lp:~donal-lafferty/glance/fix739433
- Jay Pipes (community): Approve
- Devin Carlen (community): Approve
-
Diff: 277 lines (+201/-3)5 files modifiedglance/registry/db/migrate_repo/schema.py (+3/-0)
glance/registry/db/migrate_repo/versions/005_size_big_integer.py (+99/-0)
glance/registry/db/models.py (+2/-2)
tests/functional/__init__.py (+37/-1)
tests/functional/test_curl_api.py (+60/-0)
lp:~jaypipes/glance/bug739433
(Merged)
Changed in glance: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Jay Pipes (jaypipes) |
milestone: | none → cactus-2011-04-07 |
status: | Triaged → In Progress |
Changed in glance: | |
status: | In Progress → Fix Committed |
Changed in glance: | |
milestone: | cactus-2011-04-07 → 2011.2 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Python converts integers to long integers internally as they get bigger. Obviously there could be issues if this values is used in a c-style data structure or by a client that cannot handle larger values, but the referenced lines don't break.
For example, in a python console: 940149670320537 6L
>>> int(2**100)
126765060022822
If there were limits to the integer representation, that would have overflowed them.