Skip to content

Failing to mount in microk8s path 108 characters limit v2 #577

@oriolcx

Description

@oriolcx

/kind bug

NOTE: Not a filesystem bug in Mountpoint itself; this is about the CSI node plugin’s kubelet path handling.

What happened?
On Ubuntu's MicroK8s (snap install), kubelet’s root directory is long (/var/snap/microk8s/common/var/lib/kubelet). The node-driver-registrar places the registration socket that exceeds the Linux AF_UNIX pathname limit (107 bytes), so the registrar fails to bind the socket and the driver never registers with kubelet.

What you expected to happen?
The CSI node plugin should register successfully with kubelet on MicroK8s without manual reconfiguration of kubelet’s --root-dir.

How to reproduce it (as minimally and precisely as possible)?
Ubuntu 22.04.4 LTS

snap install microk8s --classic --channel=1.32
sudo usermod -a -G microk8s $USER
su - $USER
microk8s config > ~/.kube/config
helm repo add aws-mountpoint-s3-csi-driver https://awslabs.github.io/mountpoint-s3-csi-driver
helm repo update
helm upgrade --install aws-mountpoint-s3-csi-driver \
    --namespace kube-system \
    --version 2.0.0 \
    --set node.kubeletPath=/var/snap/microk8s/common/var/lib/kubelet aws-mountpoint-s3-csi-driver/aws-mountpoint-s3-csi-driver

Then, just mount a path in kubernetes. It worked without issues with v1.5, but it seems to fail with v2.0. After exploring a bit, it seems a problem with the length of the path.

Anything else we need to know?:
This appears to be a path-length interaction between MicroK8s’ snap root dir and the CSI registration socket naming scheme.

Environment

  • Kubernetes version:
    Client Version: v1.33.4
    Kustomize Version: v5.6.0
    Server Version: v1.32.3
  • Driver version:
    -2.0.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions