老杨的博客

Ceph mgr devicehealth模块加载报错

ceph

1. 问题说明

软件版本
操作系统CentOS7.6
cephnautilus, v14.2.4

因为是刚搭建完 ceph 不久, rgw 之前暂时没用到就没有添加。 今天添加 rgw 后,通过重启 dashboard,发现报 Error 了。

ceph mgr module disable dashboard
ceph mgr module enable dashboard
Module 'devicehealth' has failed: Failed to import _strptime because the import lockis held by another thread.

通过在 dashboard 中的日志查看,发现 mgr 节点启动报错。

2. 解决办法

通过谷歌搜索,发现有人提过这个 bug,好在在 stackoverflow 中找到了解决办法。

mgr 节点中,修改 devicehealth 模块文件,

vim /usr/share/ceph/mgr/devicehealth/module.py

添加一行import _strptime

重启 mgr 服务。报错消失,问题解决。

systemctl restart ceph-mgr@ceph-node2.service

参考资料: [1] https://tracker.ceph.com/issues/41879 [2] https://stackoverflow.com/questions/2427240/thread-safe-equivalent-to-pythons-time-strptime

评论