oslo.serialization/oslo_serialization/tests
Sofia Enriquez 02037330d8 Fix json to_primitive when using IO OBjects
Currently, using Cinder's backup service with RBD the
backup-create operation gets stuck when logging
('use_json=True' must be set in the config file).

The oslo.log JSONFormatter gets stuck when passing an
RBDVolumeIOWrapper from os-brick. This happens via os-brick's
utils.trace() method which passes a connector containing
{'path': RBDVolumeIOWrapper}.
The oslo.log JSONFormatter format() method calls
oslo_serialization's jsonutils.to_primitive and passes in
this RBDVolumeIOWrapper object.
 
Therefore the to_primitive method eventually calls
RBDVolumeIOWrapper.read(). In order to fix this the current
path avoids mapping io.IOBase objects and fallback the wrapper
RBD volume object.

Co-authored-by: Eric Harney <eharney@redhat.com>
Closes-Bug: #1908607
Change-Id: I3c416e855cb5f0dc32d14b2749ba92aba8964574
2021-01-18 21:54:02 +00:00
..
__init__.py Move files out of the namespace package 2015-01-05 15:40:06 -05:00
test_base64.py Prefer raising the python2.x type error for b64 decode errors 2017-01-09 16:37:28 -08:00
test_jsonutils.py Fix json to_primitive when using IO OBjects 2021-01-18 21:54:02 +00:00
test_msgpackutils.py Drop use of six 2020-03-02 10:10:22 +00:00