Open IxDay opened 3 years ago
volumeSizeLimitMB=1024
seems big for 2GB disk space. Reduce it so that more volumes can be created.weed mount -dirAutoCreate=true -umask=000 -dir=/var/lib/kubelet/pods/02b85831-522b-4f19-9d89-621e8f86e938/volumes/kubernetes.io~csi/pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6/mount -collection=pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6 -filer=seaweed-filer.seaweedfs.svc.cluster.local:8888 -filer.path=/buckets/pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6 -cacheCapacityMB=1000 -concurrentWriters=32 -cacheDir=/tmp
directly via command line, and see what is the problem.got the following error:
weed mount -dirAutoCreate=true -umask=000 -dir="/var/lib/kubelet/pods/02b85831-522b-4f19-9d89-621e8f86e938/volumes
/kubernetes.io~csi/pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6/mount" -collection=pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a
6 -filer=seaweed-filer.seaweedfs.svc.cluster.local:8888 -filer.path=/buckets/pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6
-cacheCapacityMB=1000 -concurrentWriters=32 -cacheDir=/tmp
E0928 16:02:07 2937 mount_std.go:104] failed to retrieve inode for parent directory of /var/lib/kubelet/pods/02b85831-522b-4f19-9d89-621e8f86e938/volumes/kubernetes.io~csi/pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6/mount: stat /var/lib/kubelet/pods/02b85831-522b-4f19-9d89-621e8f86e938/volumes/kubernetes.io~csi/pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6: no such file or director
And the missing directory is actually the /pvc-43fb613e-cc87-4c79-b43e-0d7c8fd691a6
one (everything up to /var/lib/kubelet/pods/02b85831-522b-4f19-9d89-621e8f86e938/volumes/kubernetes.io~csi/
exists)
If I ls
the directory there is nothing there:
/ # ls /var/lib/kubelet/pods/02b85831-522b-4f19-9d89-621e8f86e938/volumes/kubernetes.io~csi/
/ #
"dirAutoCreate" should create that folder. Maybe it's because of the "~" sign in the path?
I am not well versed into csi internals. I put a rather default config and idk from where this ~
is coming from. Any idea of what config I should tune?
How did you setup the K8s? I am using Kind.
I am using kubeadm
with a fairly standard config (nothing fancy)
I am getting back to you because I am trying to troubleshoot what is going on. During the investigation I noticed a handful of errors in the log which are:
I1028 04:36:14 1 masterclient.go:119] master masterClient failed to receive from seaweed-master-0.seaweed-master-peer.seaweedfs:9333: rpc error: code = Unavailable desc = closing transport due to: connection error: desc = "error reading from server: EOF", received prior goaway: code: NO_ERROR
I decided to check the DNS resolution of seaweed-master-0.seaweed-master-peer.seaweedfs
which fails.
Looking at the Kubernetes way of giving pod addresses I see no mention of custom template.
Looking into the controller code I found out the template you are using and how you build addresses.
My question may be dumb but how the pod is supposed to resolve this custom template? I did not find any other mention of it within the code or config. Can you point me to this part of the logic?
I vaguely remember that in k8s, the DNS resolution depends on the ordering. A server started earlier can be visible by later containers.
Unless we are doing some stuff with the Kubernetes DNS somewhere within the code (if that is the case can you point me to the code?), I don't think this kind of record can ever be resolved by Kubernetes
No code to deal with DNS.
The master nodes are started as statefulset. https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
Sorry for the confusion it seems that I was hitting a bug from alpine/busybox using dnslookup: https://github.com/docker-library/busybox/issues/48 Continuing my investigation
Installed seaweedfs operator with certmanager: https://github.com/seaweedfs/seaweedfs-operator#installation Installed the CSI driver: https://github.com/seaweedfs/seaweedfs-csi-driver
Running a simple cluster with the following setup for the operator:
All pods are running fine for the setup. However, when I try to setup the sample config:
PVC is properly created:
But mounting fail with the following error (this is
ds/csi-seaweedfs-node csi-seaweedfs-plugin
):