rancher2.1对接ceph rbd存储启动容器libkmod: ERROR ../libkmod/libkmod.c:586 kmod_search_moddep: could not open moddep file '/lib/modules/3.10.0-514.el7.x86_64/modules.dep.bin
rancher版本:rancherv2.1.1
问题描述:
1.对接ceph rbd成功,创建数据卷在ceph 对应存储池可以看到k8s创建的存储卷
[root@node02 ~]# rbd ls rancher kubernetes-dynamic-pvc-a5bcfcae-ed98-11e8-9188-000c29472950 kubernetes-dynamic-pvc-ac419dec-ed9a-11e8-9188-000c29472950
2.启动容器不挂载数据卷,容器可以正常启动
3.容器在关在ceph rbd数据卷的情况下,容器日志提示挂在ceph rbd卷失败,具体错误日志如下:
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 4m34s (x5 over 4m37s) default-scheduler pod has unbound PersistentVolumeClaims (repeated 2 times) Normal Scheduled 4m34s default-scheduler Successfully assigned default/nginx-56c5f94dcd-hjk6g to 192.168.100.12 Normal SuccessfulAttachVolume 4m34s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-aa386c18-ed9a-11e8-8c6d-000c29472950" Warning FailedMount 4m18s kubelet, 192.168.100.12 MountVolume.WaitForAttach failed for volume "pvc-aa386c18-ed9a-11e8-8c6d-000c29472950" : rbd: map failed exit status 2, rbd output: 2018-11-21 14:35:36.594086 7f28d68b5100 -1 did not load config file, using default settings. 2018-11-21 14:35:36.604215 7f28d68b5100 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory libkmod: ERROR ../libkmod/libkmod.c:586 kmod_search_moddep: could not open moddep file '/lib/modules/3.10.0-514.el7.x86_64/modules.dep.bin' modinfo: ERROR: Module alias rbd not found. modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/3.10.0-514.el7.x86_64/modules.dep.bin' modprobe: FATAL: Module rbd not found in directory /lib/modules/3.10.0-514.el7.x86_64 rbd: failed to load rbd kernel module (1) rbd: sysfs write failed In some cases useful info is found in syslog - try "dmesg | tail" or so. rbd: map failed: (2) No such file or directory Warning FailedMount 4m17s kubelet, 192.168.100.12 MountVolume.WaitForAttach failed for volume "pvc-aa386c18-ed9a-11e8-8c6d-000c29472950" : rbd: map failed exit status 2, rbd output: 2018-11-21 14:35:37.212072 7f9839af9100 -1 did not load config file, using default settings.
4. 根据日志报错,检查了下ceph节点对应文件路径
[rancher@node02 ~]$ ls /etc/ceph/ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
[rancher@node02 ~]$ ls /lib/modules/3.10.0-514.el7.x86_64/modules.dep.bin /lib/modules/3.10.0-514.el7.x86_64/modules.dep.bin
求助,碰到这种问题应该怎么样排查错误原因呢?
没有找到相关结果
已邀请:
2 个回复
hongxiaolu
rbd模块没有加载
layker - 90后小知青
参考:https://github.com/kubernetes-incubator/external-storage/tree/master/ceph/rbd