0

我安装了具有 1 个 master 和 3 个 worker 的 kubernetes 并在其上部署了 rook,并且ceph status在 rook-tools 中显示okhttps://github.com/rook/rook.git中有 wordpress 模板, 当我创建它时,pod 没有创建并且

#kubectl describe pods wordpress-mysql-b78774f44-m548z -n default
  Type     Reason       Age                  From              Message
  ----     ------       ----                 ----              -------
  Warning  FailedMount  15m (x51 over 128m)  kubelet, ubuntu2  Unable to mount volumes for pod "test-pod-rbd_rook-ceph(15abe007-53a4-11e9-abd9-7c8bca00f216)": timeout expired waiting for volumes to attach or mount for pod "rook-ceph"/"test-pod-rbd". list of unmounted volumes=[data]. list of unattached volumes=[data default-token-8p9br]
  Warning  FailedMount  18s (x72 over 130m)  kubelet, ubuntu2  MountVolume.SetUp failed for volume "pvc-fd3fdbc4-53b7-11e9-abd9-7c8bca00f216" : mount command failed, status: Failure, reason: failed to mount volume /dev/rbd1 [xfs] to /var/lib/kubelet/plugins/ceph.rook.io/rook-ceph-system/mounts/pvc-fd3fdbc4-53b7-11e9-abd9-7c8bca00f216, error executable file not found in $PATH
#kubectl get events
18h         Warning   FailedMount               pod/wordpress-mysql-b78774f44-m548z                         MountVolume.SetUp failed for volume "pvc-e1e758a8-53b6-11e9-abd9-7c8bca00f216" : mount command failed, status: Failure, reason: failed to mount volume /dev/rbd0 [xfs] to /var/lib/kubelet/plugins/ceph.rook.io/rook-ceph-system/mounts/pvc-e1e758a8-53b6-11e9-abd9-7c8bca00f216, error executable file not found in $PATH
18h         Warning   FailedMount               pod/wordpress-mysql-b78774f44-m548z                         Unable to mount volumes for pod "wordpress-mysql-b78774f44-m548z_default(e1f6de90-53b6-11e9-abd9-7c8bca00f216)": timeout expired waiting for volumes to attach or mount for pod "default"/"wordpress-mysql-b78774f44-m548z". list of unmounted volumes=[mysql-persistent-storage]. list of unattached volumes=[mysql-persistent-storage default-token-bktfl]
35m         Warning   FailedMount               pod/wordpress-mysql-b78774f44-m548z                         MountVolume.SetUp failed for volume "pvc-e1e758a8-53b6-11e9-abd9-7c8bca00f216" : mount command failed, status: Failure, reason: Rook: Error getting RPC client: error connecting to socket /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ceph.rook.io~rook-ceph-system/.rook.sock: dial unix /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ceph.rook.io~rook-ceph-system/.rook.sock: connect: connection refused
6m32s       Warning   FailedMount               pod/wordpress-mysql-b78774f44-m548z                         Unable to mount volumes for pod "wordpress-mysql-b78774f44-m548z_default(e1f6de90-53b6-11e9-abd9-7c8bca00f216)": timeout expired waiting for volumes to attach or mount for pod "default"/"wordpress-mysql-b78774f44-m548z". list of unmounted volumes=[mysql-persistent-storage]. list of unattached volumes=[mysql-persistent-storage default-token-bktfl]
4m17s       Warning   FailedMount               pod/wordpress-mysql-b78774f44-m548z                         MountVolume.SetUp failed for volume "pvc-e1e758a8-53b6-11e9-abd9-7c8bca00f216" : mount command failed, status: Failure, reason: Rook: Mount volume failed: failed to attach volume replicapool/pvc-e1e758a8-53b6-11e9-abd9-7c8bca00f216: failed to map image replicapool/pvc-e1e758a8-53b6-11e9-abd9-7c8bca00f216 cluster rook-ceph. failed to map image replicapool/pvc-e1e758a8-53b6-11e9-abd9-7c8bca00f216: Failed to complete 'rbd': signal: interrupt. . output:

我该如何解决?它是一个错误吗?

4

2 回答 2

0

这看起来像pv,pvc有问题。请运行更多基础检查,例如:


    kubectl get pods,pv,pvc --all-namespaces
    kubectl describe pvc-fd3fdbc4-53b7-11e9-abd9-7c8bca00f216 
    kubectl get pvc pvc-fd3fdbc4-53b7-11e9-abd9-7c8bca00f216 -o yaml
    kubectl get pod wordpress-mysql-b78774f44-m548z -o yaml 
    kubectl -n rook-ceph get all
    kubectl get storageclasses --all-namespaces

在使用Rook时,您可以找到有关故障排除技术和命令的更多有用信息

希望对您有所帮助,并请分享您找到的内容,以便我们解决此问题。

于 2019-04-01T09:51:00.963 回答
0

要解决此问题,您必须在 StorageClass 中更改 fstype: xfs -> ext4

于 2019-09-06T11:26:09.667 回答