Manila ceph_volume client <cannot use a string pattern on a bytes-like object>

asked 2020-02-02 16:34:51 -0500

curvedside gravatar image

updated 2020-02-02 19:54:33 -0500

I'm trying to add ceph backend for manila. And getting the error:

2020-02-02 12:55:07.990 2480 INFO oslo_service.periodic_task [-] Skipping periodic task update_share_usage_size because it is disabled
2020-02-02 12:55:08.038 2480 INFO oslo_service.service [req-f226aaa3-9fd1-4bd3-92dc-8c5c4b536cc3 - - - - -] Starting 1 workers
2020-02-02 12:55:08.043 2488 INFO manila.service [-] Starting manila-share node (version 9.0.0)
2020-02-02 12:55:08.485 2488 INFO manila.share.drivers.cephfs.driver [req-dd7dd49d-d068-4baf-911b-5cfd9c423d8c - - - - -] [cephfs1}] Ceph client found, connecting...
2020-02-02 12:55:08.510 2488 INFO ceph_volume_client [req-dd7dd49d-d068-4baf-911b-5cfd9c423d8c - - - - -] evict clients with auth_name=manila
2020-02-02 12:55:18.601 2488 INFO ceph_volume_client [req-dd7dd49d-d068-4baf-911b-5cfd9c423d8c - - - - -] evict: joined all
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager [req-dd7dd49d-d068-4baf-911b-5cfd9c423d8c - - - - -] Error encountered during initialization of driver CephFSDriver@infra1-manila-container-f871e478@cephfs1: TypeError: cannot use a string pattern on a bytes-like object
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager Traceback (most recent call last):
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager   File "/usr/lib/python3/dist-packages/manila/share/manager.py", line 311, in _driver_setup
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager     self.driver.do_setup(ctxt)
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager   File "/usr/lib/python3/dist-packages/manila/share/drivers/cephfs/driver.py", line 155, in do_setup
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager     ceph_vol_client=self.volume_client)
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager   File "/usr/lib/python3/dist-packages/manila/share/drivers/cephfs/driver.py", line 232, in volume_client
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager     self._volume_client.connect(premount_evict=premount_evict)
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager   File "/usr/lib/python3/dist-packages/ceph_volume_client.py", line 506, in connect
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager     self._connect(premount_evict)
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager   File "/usr/lib/python3/dist-packages/ceph_volume_client.py", line 484, in _connect
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager     self.recover()
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager   File "/usr/lib/python3/dist-packages/ceph_volume_client.py", line 309, in recover
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager     match = re.search(regex, d.d_name)
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager   File "/usr/lib/python3.6/re.py", line 182, in search
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager     return _compile(pattern, flags).search(string)
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager TypeError: cannot use a string pattern on a bytes-like object
2020-02-02 12:55:23.403 2488 ERROR manila.share.manager

manila.conf:

[database]
connection = mysql+pymysql://manila:1e98f80bf6c823e8@172.29.236.11/manila?charset=utf8

[DEFAULT]
use_stderr = False
debug = False
fatal_deprecations = False
auth_strategy = keystone
enabled_share_protocols = CEPHFS,NFS,CIFS
enabled_share_backends = cephfs1
transport_url = rabbit://manila:f0ae2794ff7e6c0a18c3b81bcc0f28c076@172.29.237.130:5671//manila?ssl=1
default_share_type = generic1,cephfs1
share_name_template = share-%s
rootwrap_config = /etc/manila/rootwrap.conf
api_paste_config = /etc/manila/api-paste.ini
my_ip = 172.29.239.214

[cephfs1]
driver_handles_share_servers = False ...
(more)
edit retag flag offensive close merge delete

Comments

I don't know anything about Manila and little about Ceph (i.e. I will be unlikely to have a solution), but it might be useful to show the full stack trace from the first log. Just edit your question and add it.

The manila-share service is probably down as a consequence of the problem.

Bernd Bausch gravatar imageBernd Bausch ( 2020-02-02 17:54:23 -0500 )edit

Random guess here, but your line 309 in ceph_volume_client.py differs from mine, which is:

match = re.search(regex, d.d_name.decode(encoding='utf-8'))

Might be a version mismatch between manila and python ceph libs.

Fenuks gravatar imageFenuks ( 2020-02-15 03:20:06 -0500 )edit

Was this fixed ?

Deepa gravatar imageDeepa ( 2020-05-25 11:57:17 -0500 )edit