image.stat() call sometimes fails
Bug #1625489 reported by
Dr. Jens Harbott
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ceph (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Triaged
|
High
|
Unassigned | ||
Yakkety |
Triaged
|
High
|
Unassigned | ||
Zesty |
Fix Released
|
High
|
Unassigned |
Bug Description
The error looks like
'utf8' codec can't decode byte 0x82 in position 24: invalid start byte.
where the position always is 24, which seems to be the end of the "block_name_prefix" string, and the byte itself it varying.
About 50% of the time the test script gives an error.
Changed in ceph (Ubuntu Zesty): | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Right, after doing a bit more debugging, this looks like a bug in python-rbd only. Running the following python code, I am seeing the same errors about 50% of the time:
import rados conffile= '/etc/ceph/ ceph.conf' ) open_ioctx( 'images' ) c655-49c8- b77d-eedd356f53 49')
import rbd
cluster = rados.Rados(
cluster.connect()
ioctx = cluster.
image = rbd.Image(ioctx, '41a6aadf-
stat = image.stat()
print stat['size'] == image.size()
$ python test.py ceph-XmVvyr/ ceph-10. 2.2/src/ build/rbd. c:10803) ceph-XmVvyr/ ceph-10. 2.2/src/ build/rbd. c:2440) python2. 7/encodings/ utf_8.py" , line 16, in decode utf_8_decode( input, errors, True)
True
$ python test.py
Traceback (most recent call last):
File "test.py", line 7, in <module>
stat = image.stat()
File "rbd.pyx", line 1124, in rbd.Image.stat (/build/
File "rbd.pyx", line 433, in rbd.decode_cstr (/build/
File "/usr/lib/
return codecs.
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf4 in position 24: unexpected end of data
The "position" in the error is always 24, with varying byte values.