hetznercloud / csi-driver

Kubernetes Container Storage Interface driver for Hetzner Cloud Volumes
MIT License
639 stars 103 forks source link

Topology key not found #92

Closed andrei-dascalu closed 4 years ago

andrei-dascalu commented 4 years ago

Hello & happy new year!

After performing the setup steps described in the readme, on trying to provision the test volume, I am seeing this error in the csi-provisioner pod:

type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "hcloud-volumes": error generating accessibility requirements: no topology key found on CSINode

and the PVC remains in pending forever.

I am using Kubernetes 1.17 (microk8s), where the CSINodeInfo feature gateway is now GA. Also, I enabled CSIDriverRegistry feature gateway via kubelet params.

Am I missing something?

LKaemmerling commented 4 years ago

We don't support microk8s. You should go with the full featured k8s version.

mehdisadeghi commented 4 years ago

For future visitors coming from the Internet. I notieced that, if in the deployment yaml file, I set --feature-gates=Topology to false the provisioning will work. By disabling that probably I have broken some functionality, nevertheless it was enough for my test.

This changed caused the volume to be provisioned and removed when I removed the pvc. However, the attachment failed with this error:

  Normal   Scheduled           <unknown>             default-scheduler           Successfully assigned default/my-csi-app to ubuntu-2gb-nbg1-1
  Warning  FailedAttachVolume  90s (x10 over 5m40s)  attachdetach-controller     AttachVolume.Attach failed for volume "pvc-f62bd26d-cd23-417d-9043-db6933e72db6" : CSINode ubuntu-2gb-nbg1-1 does not contain driver csi.hetzner.cloud
  Warning  FailedMount         79s (x2 over 3m37s)   kubelet, ubuntu-2gb-nbg1-1  Unable to attach or mount volumes: unmounted volumes=[my-csi-volume], unattached volumes=[my-csi-volume default-token-bmxf2]: timed out waiting for the condition

@LKaemmerling any chance you can explain why this fails? For educational purposes :)

scardena commented 4 years ago

if anyone else runs into this, what happened to me was completetly different. I had some pod security policies blocking the daemonset for the csi driver. you might want to check that the csi daemonset in kube-system is running properly as well.

nemo83 commented 3 years ago

For future visitors coming from the Internet. I notieced that, if in the deployment yaml file, I set --feature-gates=Topology to false the provisioning will work. By disabling that probably I have broken some functionality, nevertheless it was enough for my test.

This changed caused the volume to be provisioned and removed when I removed the pvc. However, the attachment failed with this error:

  Normal   Scheduled           <unknown>             default-scheduler           Successfully assigned default/my-csi-app to ubuntu-2gb-nbg1-1
  Warning  FailedAttachVolume  90s (x10 over 5m40s)  attachdetach-controller     AttachVolume.Attach failed for volume "pvc-f62bd26d-cd23-417d-9043-db6933e72db6" : CSINode ubuntu-2gb-nbg1-1 does not contain driver csi.hetzner.cloud
  Warning  FailedMount         79s (x2 over 3m37s)   kubelet, ubuntu-2gb-nbg1-1  Unable to attach or mount volumes: unmounted volumes=[my-csi-volume], unattached volumes=[my-csi-volume default-token-bmxf2]: timed out waiting for the condition

@LKaemmerling any chance you can explain why this fails? For educational purposes :)

Hey, THANK YOU for your post, that unblocked me. Just out of curiosity, where were you running the CSI driver? I'm having fun with microk8s and raspberry pi. Also I don't think that setting topology to false broke something else but, I think, it just made aware the provider that volumes cannot be passed around among nodes. Doc: https://kubernetes-csi.github.io/docs/topology.html

[EDIT] Just a quick update to say I've managed to create a handy helm chart for other people to easily start to play around. Repo is https://github.com/speedwing/csi-hostpath-helm