ceph-volumeattacher: failed rbd single_major check, assuming it's unsupported: failed to check for rbd module single_major param: Failed to complete 'check kmod param': exit status 1. modinfo: ERROR:

could not get modinfo from 'rbd': Exec format error

modinfo rbd
filename:       /lib/modules/3.10.0-693.21.1.el7.x86_64/kernel/drivers/block/rbd.ko.xz

解决:

给容器里安装xz 解压命令,因为新版内核中库文件是 xz 压缩包

或者将宿主机的rbd.ko.xz 解压,将解压后的rbd.ko 软连接到 rbd.ko.xz, 这样容器就不用解压了
------------------------------------------------------------

2018-04-21 04:03:27.450807 I | cephosd: skipping device sdb that is in use (not by rook). fs: , ownPartitions: false

2018-04-21 04:03:27.483015 I | cephosd: configuring osd devices: {"Entries":{}}

解决:

使用无分区的裸磁盘

------------------------------------------------------------

MountVolume.SetUp failed for volume "pvc-f002e1fe-469c-11e8-9dca-90b8d0599f2f" : mount command failed, status: Failure, reason: Rook: Error getting RPC client: error connecting to socket /usr/libexec/kubernetes/kubelet-plugins/volume/exec/rook.io~rook/.rook.sock: dial unix /usr/libexec/kubernetes/kubelet-plugins/volume/exec/rook.io~rook/.rook.sock: connect: no such file or directory

 

解决:

rook-operator.yml

env:
- name: FLEXVOLUME_DIR_PATH
value: "/var/lib/kubelet/volumeplugins"

kubelet 启动加上

--volume-plugin-dir=/var/lib/kubelet/volumeplugins

------------------------------------------------------------------------------------------

pod event:

MountVolume.SetUp failed for volume "pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f" : mount command failed, status: Failure, reason: Rook: Mount volume failed: failed to attach volume replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f: failed to map image replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f cluster rook. failed to map image replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f: Failed to complete 'rbd': signal: interrupt. . output: pod has unbound PersistentVolumeClaims (repeated 7 times)

rook-agent  logs:

2018-04-23 03:11:28.618916 I | exec: Running command: rbd map replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f --id admin --cluster=rook --keyring=/tmp/rook.keyring362403923 -m 10.254.233.241:6790 --conf=/dev/null

2018-04-23 03:12:28.620071 I | exec: Timeout waiting for process rbd to return. Sending interrupt signal to the process
2018-04-23 03:12:28.624230 E | flexdriver: Attach volume replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f failed: failed to attach volume replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f: failed to map image replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f cluster rook. failed to map image replicapool/pvc-99dabdb1-46a4-11e8-9dca-90b8d0599f2f: Failed to complete 'rbd': signal: interrupt. . output:

进入容器手动执行

rbd: sysfs write failed

 

解决: