Skip to content

Driver registration appears broken #918

@kbreit

Description

@kbreit

What happened:
I am deploying Prometheus with the NFS driver providing persistent storage. The CSI driver is installed via Helm and all controller and node pods are up and READY. When I run my Prometheus pod it doesn't start successfully with the following error:

  Warning  FailedMount  52s (x702 over 23h)  kubelet  MountVolume.MountDevice failed for volume "pvc-d37818b3-5bb4-49ea-99c7-984579fe6871" : kubernetes.io/csi: attacher.MountDevice failed to create newCsiDriverClient: driver name nfs.csi.k8s.io not found in the list of registered CSI drivers

Here are logs for the 3 containers in the node pod for that node.

❯ kubectl -n kube-system logs csi-nfs-node-nwpqj
Defaulted container "liveness-probe" out of: liveness-probe, node-driver-registrar, nfs
I0528 03:23:59.037639       1 main.go:135] "Calling CSI driver to discover driver name"
I0528 03:23:59.039000       1 main.go:143] "CSI driver name" driver="nfs.csi.k8s.io"
I0528 03:23:59.039049       1 main.go:172] "ServeMux listening" address="localhost:29653"

k8s-infra on  main [!?]
❯ kubectl -n kube-system logs csi-nfs-node-nwpqj -c node-driver-registrar
I0528 03:22:19.505312       1 main.go:150] "Version" version="v2.13.0"
I0528 03:22:19.505424       1 main.go:151] "Running node-driver-registrar" mode=""
I0528 03:22:19.505435       1 main.go:172] "Attempting to open a gRPC connection" csiAddress="/csi/csi.sock"
I0528 03:22:19.506264       1 main.go:180] "Calling CSI driver to discover driver name"
I0528 03:22:19.507908       1 main.go:189] "CSI driver name" csiDriverName="nfs.csi.k8s.io"
I0528 03:22:19.508006       1 node_register.go:56] "Starting Registration Server" socketPath="/registration/nfs.csi.k8s.io-reg.sock"
I0528 03:22:19.508201       1 node_register.go:66] "Registration Server started" socketPath="/registration/nfs.csi.k8s.io-reg.sock"
I0528 03:22:19.508413       1 node_register.go:96] "Skipping HTTP server"
I0528 03:22:20.728591       1 main.go:96] "Received GetInfo call" request="&InfoRequest{}"
I0528 03:22:21.392540       1 main.go:108] "Received NotifyRegistrationStatus call" status="&RegistrationStatus{PluginRegistered:true,Error:,}"

k8s-infra on  main [!?]
❯ kubectl -n kube-system logs csi-nfs-node-nwpqj -c nfs
I0528 03:22:19.602554       1 nfs.go:90] Driver: nfs.csi.k8s.io version: v4.11.0
I0528 03:22:19.602723       1 nfs.go:147]
DRIVER INFORMATION:
-------------------
Build Date: "2025-03-18T13:07:23Z"
Compiler: gc
Driver Name: nfs.csi.k8s.io
Driver Version: v4.11.0
Git Commit: ""
Go Version: go1.23.6
Platform: linux/amd64

Streaming logs below:
I0528 03:22:19.605856       1 mount_linux.go:334] Detected umount with safe 'not mounted' behavior
I0528 03:22:19.606155       1 server.go:117] Listening for connections on address: &net.UnixAddr{Name:"//csi/csi.sock", Net:"unix"}
I0528 03:22:20.599876       1 utils.go:111] GRPC call: /csi.v1.Identity/GetPluginInfo
I0528 03:22:20.599971       1 utils.go:112] GRPC request: {}
I0528 03:22:20.602465       1 utils.go:118] GRPC response: {"name":"nfs.csi.k8s.io","vendor_version":"v4.11.0"}
I0528 03:22:20.729465       1 utils.go:111] GRPC call: /csi.v1.Node/NodeGetInfo
I0528 03:22:20.729481       1 utils.go:112] GRPC request: {}
I0528 03:22:20.729512       1 utils.go:118] GRPC response: {"node_id":"kbedge001"}
I0528 03:22:38.028051       1 utils.go:111] GRPC call: /csi.v1.Identity/GetPluginInfo
I0528 03:22:38.028308       1 utils.go:112] GRPC request: {}
I0528 03:22:38.028480       1 utils.go:118] GRPC response: {"name":"nfs.csi.k8s.io","vendor_version":"v4.11.0"}
I0528 03:23:08.018751       1 utils.go:111] GRPC call: /csi.v1.Identity/GetPluginInfo
I0528 03:23:08.018762       1 utils.go:112] GRPC request: {}
I0528 03:23:08.018816       1 utils.go:118] GRPC response: {"name":"nfs.csi.k8s.io","vendor_version":"v4.11.0"}
I0528 03:23:59.038230       1 utils.go:111] GRPC call: /csi.v1.Identity/GetPluginInfo
I0528 03:23:59.038265       1 utils.go:112] GRPC request: {}
I0528 03:23:59.038285       1 utils.go:118] GRPC response: {"name":"nfs.csi.k8s.io","vendor_version":"v4.11.0"}

While I don't know exactly what the problem is I did notice there is nothing for the NFS CSI driver in the plugins_registry directory, only other CSI drivers I have tried as part of troubleshooting for this problem.

root@kbedge001:/var/lib/kubelet/plugins_registry# ls
container-image.csi.k8s.io-reg.sock  org.democratic-csi.local-hostpath-reg.sock

I confirmed this directory is represented the same in the container by looking at the container filesystem in the /proc/<pid>/root/registration directory. Note, this may not be the problem but it's something that stuck out to me. Finally, the csidriver is visible.

❯ kubectl get csidriver nfs.csi.k8s.io
NAME             ATTACHREQUIRED   PODINFOONMOUNT   STORAGECAPACITY   TOKENREQUESTS   REQUIRESREPUBLISH   MODES        AGE
nfs.csi.k8s.io   false            false            false             <unset>         false               Persistent   2d8h

What you expected to happen:
I expected my pod to come up and have the registration happen transparently, if it isn't already.

How to reproduce it:

  1. Install NFS CSI driver on k3s, Helm method probably too
  2. Create PVC
  3. Create pod bound to the new PVC

Anything else we need to know?:

values.yaml file is blank so it should be using defaults.

Environment:

  • CSI Driver version: v4.11.0
  • Kubernetes version (use kubectl version): 1.31.5+k3s1
  • OS (e.g. from /etc/os-release): Ubuntu 24.04.1 LTS
  • Kernel (e.g. uname -a): Linux kbedge001 6.8.0-55-generic Add manifest for installing driver controller and install docs #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: Helm
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions