I am using Microk8s (1.19, on Ubuntu 20.04.1 LTS) and am trying to use OpenOBS (cStor engine) for storage.

Since I'm running this locally before pushing to prod, I created virtual block devices with:

blockdevicedisk='/k8storage/diskimage'
blockdevicesize=10000
sudo dd if=/dev/zero of=$blockdevicedisk bs=1M count=$blockdevicesize
sudo mkfs.ext4 $blockdevicedisk
sudo losetup /dev/loop0 /k8storage/diskimage
$lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0   7:0    0  9.8G  0 loop
loop1   7:1    0  7.8G  0 loop
sda     8:0    0  256G  0 disk
sdb     8:16   0  256G  0 disk /

I installed OpenEBS with helm, then removed 'loop' from the openebs-ndm-config -> filterconfigs -> path-filter -> exclude. So that ndm would display these as blockdevices.

$kubectl get blockdevices -n openebs
NAME                                           NODENAME   SIZE           CLAIMSTATE   STATUS   AGE
blockdevice-87ca7d6819eab3ea3af2884f2f6e9f8e   v          274877906944   Unclaimed    Active   19h
blockdevice-0a6c8d26081660a37f0a87dbb316c7ae   v          10485760000    Unclaimed    Active   19h
blockdevice-cd43d37664edd1c880e11f5b8e9cbe60   v          8388608000     Unclaimed    Active   19h

^ the last 2 are the ones I made. I then wrote the config to create a cStor StoragePoolClaim

apiVersion: openebs.io/v1alpha1
kind: StoragePoolClaim
metadata:
  name: cstor-pool-claim
spec:
  name: cstor-pool-claim
  type: disk
  poolSpec:
    poolType: striped
  blockDevices:
    blockDeviceList:
    - blockdevice-0a6c8d26081660a37f0a87dbb316c7ae
    - blockdevice-cd43d37664edd1c880e11f5b8e9cbe60

When I apply it, both the blockdevices are claimed

$kubectl get blockdevices -n openebs
NAME                                           NODENAME   SIZE           CLAIMSTATE   STATUS   AGE
blockdevice-87ca7d6819eab3ea3af2884f2f6e9f8e   v          274877906944   Unclaimed    Active   19h
blockdevice-0a6c8d26081660a37f0a87dbb316c7ae   v          10485760000    Claimed      Active   19h
blockdevice-cd43d37664edd1c880e11f5b8e9cbe60   v          8388608000     Claimed      Active   19h

which is expected.

$kubectl get spc
NAME               AGE
cstor-pool-claim   18h

However, there is a problem!

$kubectl get csp
NAME                    ALLOCATED   FREE   CAPACITY   STATUS   READONLY   TYPE      AGE
cstor-pool-claim-nf0g                                 Init     false      striped   19h

It never changes from Init status. There is a pod created which shows the error as

$kubectl describe pod cstor-pool-claim-nf0g-6cb75f8f49-sw6q2 -n openebs

which spews a lot of text I could show if it helps. The key part is the error message, which is:

Error: failed to create containerd task: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: rootfs_linux.go:59: mounting "/var/snap/microk8s/common/run/containerd/io.containerd.grpc.v1.cri/sandboxes/a9b84df9076c91b83982f157e9bacdc5a10f80846d32034dd15cdae1c1d4c4c1/shm" to rootfs at "/dev/shm" caused: secure join: too many levels of symbolic links: unknown

I've tried resetting my setup and re-entering the commands one-by-one to ensure that I was following the documentation, and other examples correctly, however, I keep encountering this error.

Is this a limitation of microk8s? A fault of OpenEBS? Something weird about my setup? Or did I do something wrong?

More importantly: Is there a way to get this to work correctly?

0

There are 0 answers