rados.Object.write(string_to_write) [1] and rados.Ioctx.write(data) [2]
expect to write byte data for the above named arguments.
rados.Object.read() returns that data.
Ensure that the json_meta argument passed to rados.Object.write() in
VolumeMetadataBackup.set() is encoded as a UTF-8 bytes object and decoded
after rados.Object.read().
Also update the corresponding unit tests to ensure that metadata
dictionaries are JSON serialized, encoded, and decoded similar to
how the actual code behaves. [3]
Reviewed: https:/ /review. openstack. org/612990 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=8280fa0df61 be7097bf44c9333 8f530bbd03b7cc
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 8280fa0df61be70 97bf44c93338f53 0bbd03b7cc
Author: Corey Bryant <email address hidden>
Date: Mon Oct 22 14:45:33 2018 -0400
PY3: Ensure rados.Object. read/write use byte data
rados. Object. write(string_ to_write) [1] and rados.Ioctx. write(data) [2] Object. read() returns that data.
expect to write byte data for the above named arguments.
rados.
Ensure that the json_meta argument passed to rados.Object. write() in ataBackup. set() is encoded as a UTF-8 bytes object and decoded read().
VolumeMetad
after rados.Object.
Also update the corresponding unit tests to ensure that metadata
dictionaries are JSON serialized, encoded, and decoded similar to
how the actual code behaves. [3]
[1] https:/ /github. com/ceph/ ceph/blob/ v13.2.1/ src/pybind/ rados/rados. pyx#L3984 /github. com/ceph/ ceph/blob/ v13.2.1/ src/pybind/ rados/rados. pyx#L2641 /bugs.launchpad .net/cinder/ +bug/1798917/ comments/ 4
[2] https:/
[3] https:/
Change-Id: Idb225b5c84be3b eac0c272ed4b8d6 9ebb04c5858
Closes-Bug: #1798917