cinder.backup.drivers' has no attribute 'ceph'

小蕊 发表于: 2023-02-16   最后更新时间: 2023-02-16 18:14:45   950 游览

cinder-backup更换ceph后无法启动,我在 /var/log/kolla/cinder/cinder-backup.log 发现如下错误:

ERROR cinder ImportError: Class ceph cannot be found (['Traceback (most recent call last):\n', ' File "/var/lib/kolla/venv/lib/python3.9/site-packages/oslo_utils/importutils.py", line 32, in import_class\n return getattr(sys.modules[mod_str], class_str)\n', "AttributeError: module 'cinder.backup.drivers' has no attribute 'ceph'\n"])

错误明细如下:

2023-02-16 14:24:04.200 7 ERROR cinder Traceback (most recent call last):
2023-02-16 14:24:04.200 7 ERROR cinder   File "/var/lib/kolla/venv/lib/python3.9/site-packages/oslo_utils/importutils.py", line 32, in import_class
2023-02-16 14:24:04.200 7 ERROR cinder     return getattr(sys.modules[mod_str], class_str)
2023-02-16 14:24:04.200 7 ERROR cinder AttributeError: module 'cinder.backup.drivers' has no attribute 'ceph'
2023-02-16 14:24:04.200 7 ERROR cinder
2023-02-16 14:24:04.200 7 ERROR cinder During handling of the above exception, another exception occurred:
2023-02-16 14:24:04.200 7 ERROR cinder
2023-02-16 14:24:04.200 7 ERROR cinder Traceback (most recent call last):
2023-02-16 14:24:04.200 7 ERROR cinder   File "/var/lib/kolla/venv/bin/cinder-backup", line 8, in <module>
2023-02-16 14:24:04.200 7 ERROR cinder     sys.exit(main())
2023-02-16 14:24:04.200 7 ERROR cinder   File "/var/lib/kolla/venv/lib/python3.9/site-packages/cinder/cmd/backup.py", line 128, in main
2023-02-16 14:24:04.200 7 ERROR cinder     server = service.Service.create(binary='cinder-backup',
2023-02-16 14:24:04.200 7 ERROR cinder   File "/var/lib/kolla/venv/lib/python3.9/site-packages/cinder/service.py", line 417, in create
2023-02-16 14:24:04.200 7 ERROR cinder     service_obj = cls(host, binary, topic, manager,
2023-02-16 14:24:04.200 7 ERROR cinder   File "/var/lib/kolla/venv/lib/python3.9/site-packages/cinder/service.py", line 158, in __init__
2023-02-16 14:24:04.200 7 ERROR cinder     self.manager = manager_class(host=self.host,
2023-02-16 14:24:04.200 7 ERROR cinder   File "/var/lib/kolla/venv/lib/python3.9/site-packages/cinder/backup/manager.py", line 139, in __init__
2023-02-16 14:24:04.200 7 ERROR cinder     self.service = importutils.import_class(self.driver_name)
2023-02-16 14:24:04.200 7 ERROR cinder   File "/var/lib/kolla/venv/lib/python3.9/site-packages/oslo_utils/importutils.py", line 34, in import_class
2023-02-16 14:24:04.200 7 ERROR cinder     raise ImportError('Class %s cannot be found (%s)' %
2023-02-16 14:24:04.200 7 ERROR cinder ImportError: Class ceph cannot be found (['Traceback (most recent call last):\n', '  File "/var/lib/kolla/venv/lib/python3.9/site-packages/oslo_utils/importutils.py", line 32, in import_class\n    return getattr(sys.modules[mod_str], class_str)\n', "AttributeError: module 'cinder.backup.drivers' has no attribute 'ceph'\n"])
2023-02-16 14:24:04.200 7 ERROR cinder

请问我该如何解决?

发表于 2023-02-16

Ceph的驱动从cinder.backup.drivers.ceph改为cinder.backup.drivers.ceph.CephBackupDriver了,所以你需要在cinder-backup.conf中进行修改,可以了。

你的答案

查看OpenStack相关的其他问题或提一个您自己的问题