我将Rancher v2用作k8s管理平台,并在VMware vSphere上运行RancherOS节点。我手动安装了open-iSCSI,并在工作节点上安装了50GB的卷,供OpenEBS使用(必须弄清楚如何在创建节点时自动执行该操作)。我还创建了一个cStor存储类,一切看起来都不错。但是,我无法获得使用pvc来配置pv的容器。
Warning FailedMount Unable to mount volumes for pod "web-test-54d9845456-bc8fc_infra-test(10f856c1-6882-11e9-87a2-0050568eb63d)": timeout expired waiting for volumes to attach or mount for pod "infra-test"/"web-test-54d9845456-bc8fc". list of unmounted volumes=[cstor-vol-01]. list of unattached volumes=[web-test-kube-pvc vol1 man-volmnt-01 cstor-vol-01 default-token-lxffz]
Warning FailedMount MountVolume.WaitForAttach failed for volume "pvc-b59c9b5d-6857-11e9-87a2-0050568eb63d" : failed to get any path for iscsi disk, last err seen: iscsi: failed to sendtargets to portal 10.43.48.95:3260 output: iscsiadm: Could not open /run/lock/iscsi: No such file or directory iscsiadm: Could not open /run/lock/iscsi: No such file or directory iscsiadm: Could not open /run/lock/iscsi: No such file or directory iscsiadm: Could not add new discovery record. , err exit status
我已按照以下步骤在OpenEBS文档中针对RancherOS的Prerquisitie部分中的RancherOS上启用iSCSI。
sudo ros s up open-iscsi
sudo ros config set rancher.services.user-volumes.volumes [/home:/home,/opt:/opt,/var/lib/kubelet:/var/lib/kubelet,/etc/kubernetes:/etc/kubernetes,/var/openebs]
sudo system-docker rm all-volumes
sudo reboot
答案 0 :(得分:0)
在Rancher OS的github存储库中,发现我们需要创建一个锁目录,并确保每次启动时都使用以下方式创建该目录
$ mkdir /run/lock
# update cloud-config
#cloud-config
runcmd:
- [mkdir, /run/lock]
参考路径:Rancher的github回购。然后在rancher / OS下找到问题编号2435