ceph fs status报错解决
问题描述:[root@k8s-master-2 ~]# ceph fs statusError EINVAL: Traceback (most recent call last):File “/usr/lib64/ceph/mgr/status/module.py”, line 310, in handle_commandreturn self.handle_fs_status(cmd)...
问题描述:
[root@k8s-master-2 ~]# ceph fs status
Error EINVAL: Traceback (most recent call last):
File “/usr/lib64/ceph/mgr/status/module.py”, line 310, in handle_command
return self.handle_fs_status(cmd)
File “/usr/lib64/ceph/mgr/status/module.py”, line 176, in handle_fs_status
mds_versions[metadata.get(‘ceph_version’, “unknown”)].append(info[‘name’])
AttributeError: ‘NoneType’ object has no attribute ‘get’
解决:
报错的原因可能176行是获取的 metadata 为空;
[root@k8s-master-2 ~]# ceph mds metadata
[
{
“name”: “daemon5”,
“addr”: “172.10.1.246:6800/583896531”,
“arch”: “x86_64”,
“ceph_version”: “ceph version 12.2.5 (cad919881333ac92274171586c827e01f554a70a) luminous (stable)”,
“cpu”: “Intel® Xeon® CPU E5-2670 v2 @ 2.50GHz”,
“distro”: “centos”,
“distro_description”: “CentOS Linux 7 (Core)”,
“distro_version”: “7”,
“hostname”: “k8s-ceph5”,
“kernel_description”: “#1 SMP Thu Nov 30 09:35:20 EST 2017”,
“kernel_version”: “4.14.3-1.el7.elrepo.x86_64”,
“mem_swap_kb”: “20971516”,
“mem_total_kb”: “65923428”,
“os”: “Linux”
},
{
"name": "k8s-master-2"
},
{
“name”: “daemon4”,
“addr”: “172.10.1.254:6800/3412998711”,
“arch”: “x86_64”,
“ceph_version”: “ceph version 12.2.5 (cad919881333ac92274171586c827e01f554a70a) luminous (stable)”,
“cpu”: “Intel® Xeon® CPU E5-2697 v4 @ 2.30GHz”,
“distro”: “centos”,
“distro_description”: “CentOS Linux 7 (Core)”,
“distro_version”: “7”,
“hostname”: “k8s-master-2”,
“kernel_description”: “#1 SMP Wed May 9 18:05:47 UTC 2018”,
“kernel_version”: “3.10.0-862.2.3.el7.x86_64”,
“mem_swap_kb”: “20479996”,
“mem_total_kb”: “197975904”,
“os”: “Linux”
},
{
"name": "daemon3"
},
{
"name": "k8s-master-1"
},
{
“name”: “k8s-ceph5”,
“addr”: “172.10.1.246:6801/2099734085”,
“arch”: “x86_64”,
“ceph_version”: “ceph version 12.2.5 (cad919881333ac92274171586c827e01f554a70a) luminous (stable)”,
“cpu”: “Intel® Xeon® CPU E5-2670 v2 @ 2.50GHz”,
“distro”: “centos”,
“distro_description”: “CentOS Linux 7 (Core)”,
“distro_version”: “7”,
“hostname”: “k8s-ceph5”,
“kernel_description”: “#1 SMP Thu Nov 30 09:35:20 EST 2017”,
“kernel_version”: “4.14.3-1.el7.elrepo.x86_64”,
“mem_swap_kb”: “20971516”,
“mem_total_kb”: “65923428”,
“os”: “Linux”
}
]
查询发现有的mds只有name,这个时候只要把有问题的mds服务重启下即可,问题解决。
更多推荐
所有评论(0)