Python3: decode error in rbd.py _get_pool_stats()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Eric Harney |
Bug Description
When Cinder is configured with RBD backend, and when using Python 3, it just fails in _get_pool_stats():
File "/usr/lib/
service.
File "/usr/lib/
service_
File "/usr/lib/
self.
File "/usr/lib/
stats = self.get_
File "/usr/lib/
self.
File "/usr/lib/
free_capacity, total_capacity = self._get_
File "/usr/lib/
df_data = json.loads(
File "/usr/lib/
s.
TypeError: the JSON object must be str, not 'bytes'
The solution is to simply call .decode("UTF-8"). I'm following-up with a patch.
Changed in cinder: | |
assignee: | Thomas Goirand (thomas-goirand) → Eric Harney (eharney) |
Fix proposed to branch: master /review. openstack. org/568813
Review: https:/