ceph fs status報錯解決
阿新 • • 發佈:2018-11-07
問題描述:
[[email protected] ~]# 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 為空;
[[email protected] ~]# 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服務重啟下即可,問題解決。