Some Python installations, in particular for RHEL 6.1 Python 2.6, that are not 64 bit clean "glance add" will fail. For example, where testimage.img is larger than 2GB
The underlying problem is a INT_MAX macro in the fileobject.c method 'readahead_get_line_skip' uses a 32 bit value instead of a 64 bit value. The Python file iterator eventually calls down to this method, which causes a crash for large file sizes.
A workaround for RHEL users is to comment out the "elif self._iterable(body):" section for the image_iterator method in glance/common/client.py and fall back to the ImageBodyIterator.
While not directly a bug with Glance, it does impact a subset of users not running Ubuntu systems.
Some Python installations, in particular for RHEL 6.1 Python 2.6, that are not 64 bit clean "glance add" will fail. For example, where testimage.img is larger than 2GB
glance --debug add name="testimage" disk_format=raw is_public=true < testimage.img fileobject. c:2117: readahead_ get_line_ skip: Assertion `skip+len < 2147483647' failed.
python: Objects/
The underlying problem is a INT_MAX macro in the fileobject.c method 'readahead_ get_line_ skip' uses a 32 bit value instead of a 64 bit value. The Python file iterator eventually calls down to this method, which causes a crash for large file sizes.
A workaround for RHEL users is to comment out the "elif self._iterable( body):" section for the image_iterator method in glance/ common/ client. py and fall back to the ImageBodyIterator.
While not directly a bug with Glance, it does impact a subset of users not running Ubuntu systems.