Glance and CEPH rbd TypeError

asked 2020-02-13 22:27:39 -0600

jmora gravatar image

updated 2020-02-14 03:41:10 -0600

eblock gravatar image

Running into a type error when trying to store glance images on CEPH. Using python3, looks like rbd.py and rados.py are being provided a string instead of bytes type, seems like issue moving from python2 to python3 as the c_char_p type in python2 took in a string, but python3 c_char_p looks for a bytes type.

Is there is fix to this or workaround?

2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi [req-061c2891-30a0-4ba4-8ef4-d61daddcd653 ca0816a1f8eb4497b2d72e123698c266 ba6f2b182bed4d86aa38fcd62bab2bbe - default default] Caught error: bytes or integer address expected instead of str instance: TypeError: bytes or integer address expected instead of str instance
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi Traceback (most recent call last):
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/glance/common/wsgi.py", line 1347, in __call__
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     request, **action_args)
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/glance/common/wsgi.py", line 1390, in dispatch
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     return method(*args, **kwargs)
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/glance/common/utils.py", line 414, in wrapped
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     return func(self, req, *args, **kwargs)
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/glance/api/v2/image_data.py", line 299, in upload
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     self._restore(image_repo, image)
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     self.force_reraise()
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     six.reraise(self.type_, self.value, self.tb)
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     raise value
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/glance/api/v2/image_data.py", line 164, in upload
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     image.set_data(data, size, backend=backend)
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/glance/domain/proxy.py", line 198, in set_data
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi     self.base.set_data(data, size, backend=backend)
2020-02-13 22:11:35.279 23652 ERROR glance.common.wsgi   File "/usr/local/lib/python3.6/site-packages/glance/notifier.py", line 485, in set_data
2020-02-13 22:11:35.279 23652 ...
(more)
edit retag flag offensive close merge delete

Comments

1

Can you provide more details about your openstack version and which ceph version you're using? I had no troubles setting up openstack train with ceph nautilus and python 3.

eblock gravatar imageeblock ( 2020-02-14 03:43:03 -0600 )edit

Yes, ceph version 14.2.7 (3d58626ebeec02d8385a4cefb92c6cbc3a45bfe8) nautilus (stable), EL7, Openstack manual deploy.

I had no issues with python2 and nautilus, but did fresh build with python3 and seem to hang here when using rbd backend.

jmora gravatar imagejmora ( 2020-02-14 08:55:50 -0600 )edit