【问题标题】:Unable to provision OpenEBS volume on RancherOS无法在 RancherOS 上配置 OpenEBS 卷
【发布时间】:2019-04-29 18:09:11
【问题描述】:

我使用 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 的 Prerquisitee 部分在 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

【问题讨论】:

    标签: openebs rancheros


    【解决方案1】:

    从Rancher OS的github仓库,发现我们需要创建一个lock目录,并且确保每次开机都使用以下方式创建这个目录

    $ mkdir /run/lock
    # update cloud-config
    #cloud-config
    runcmd:
    - [mkdir, /run/lock]
    

    参考路径:rancher 的 github repo。然后在rancher/OS下找到issue number 2435

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-29
      • 1970-01-01
      相关资源
      最近更新 更多