backport librbd librados py3 string encoding fixes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Fix Released
|
High
|
Unassigned | ||
Rocky |
Invalid
|
High
|
Unassigned | ||
Stein |
Fix Released
|
High
|
Unassigned | ||
Train |
Fix Released
|
High
|
James Page | ||
ceph (Ubuntu) |
Fix Released
|
High
|
James Page | ||
Cosmic |
Invalid
|
High
|
James Page | ||
Disco |
Invalid
|
High
|
James Page | ||
Eoan |
Fix Released
|
High
|
James Page |
Bug Description
[Impact]
Requesting back port of py3 encoding fixes to Mimic so that consumers of that code don't get strings returned with invalid encodings when run under py3.
[Test Case]
sudo apt install -y python3-rados
cat << EOF | python3
import rados
name = 'ceph'
conf = '/etc/ceph/
user = 'a-user'
client = rados.Rados(
client.connect()
fsid = client.get_fsid()
if type(fsid) == str:
print("value={} has correct type={}
else:
print("value={} has incorrect type={} (expect str)".format(fsid, type(fsid)))
EOF
[Regression Potential]
This change ensures that cstr types are automatically decoded/encoded within the generated python bindings for the underlying system libraries.
If python code is blindly decoding the return values from the rados/rbd bindings, its possible this change will break such code paths; however the scoped changes in OpenStack detect the binary type and decode if needed.
This only really impacts any apps running under py3; py2 does lots of implicit conversation so is insulated from this bug.
-------
These fixes relate to issues we have found in Openstack [1][2] when running under Python 3. They are fixed upstream by commit [3] which is available in nautilus and beyond so we would like to backport to mimic and luminous.
[1] https:/
[2] https:/
[3] https:/
tags: | added: py3 |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in cloud-archive: | |
status: | Invalid → Fix Committed |
Changed in cloud-archive: | |
status: | Fix Released → Fix Committed |
Nautilus is stuck in eoan-proposed at the moment waiting for Ubuntu archive team review; once that's unblocked dev tasks can be marked fix committed.