kube-arangodb icon indicating copy to clipboard operation
kube-arangodb copied to clipboard

ArangoLocalStorage does not work on Rancher

Open ewoutp opened this issue 7 years ago • 4 comments

Problem: Volumes are not mounted because kubelet claims that a local path does not exists (which is does).

Since rancher is running kubelet in a container, I expect that this is a mount propagation issue.

See https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation

ewoutp avatar Nov 21 '18 10:11 ewoutp

I can confirm this issue using Rancher 2.1.7 and its default Kubernetes (v1.13.4-rancher1-1) on a bare metal cluster. The subdirectories for all volumes have been created automatically on the respective hosts but the initialisation of the servers and agents failed with the claim that the directory does not exist.

I tried to determine if your expectation is correct and tried to hardcode the mount propagation into a my clone of kube-arangodb. However, I failed with the following error message:

.gobuild/src/github.com/arangodb/kube-arangodb/pkg/util/k8sutil/pods.go:180:79: cannot use "k8s.io/api/core/v1".MountPropagationHostToContainer (type "k8s.io/api/core/v1".MountPropagationMode) as type *"k8s.io/api/core/v1".MountPropagationMode in field value

Having never programmed in GO, I have no idea what the compiler wants to tell me. I thought I used the required type, but obviously the compiler does not agree.

jgerken avatar Mar 15 '19 20:03 jgerken

Any update on this?

phal0r avatar Dec 23 '19 02:12 phal0r

https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/issues/107#issuecomment-521340157

kubelet doesn't see the path because it's dockerized

2 options

  • define extra_binds in RKE kubelet config, kubelet will then see that
  • use the /var/lib/kubelet/ volume which is already bound
  localPath:
    - /var/lib/kubelet/volumes/arango-storage

this is what I did, working for me

lnogol avatar Mar 22 '20 00:03 lnogol

You can update your cluster to allow kubelet docker container to mount local path. Update cluster.yml with : services:

kubelet:
   image:  rancher/hyperkube:v1.15.4-rancher1
   extra_binds:
       - "/mnt/volumes:/mnt"

Run rke up. The changes will be updated. In PV you can mention the mount path as /mnt.

It will be working.

camorra-skk avatar May 07 '20 10:05 camorra-skk