Skip to content

Prestop hook in csi-node-driver-registrar is not working #14

@sebastien-prudhomme

Description

@sebastien-prudhomme

Describe the bug

prestop hook in csi-node-driver-registrar is not working.

Socket /var/lib/kubelet/plugins_registry/csi.scaleway.com-reg.sock is still present on nodes after removing scaleway-csi.

I can notice in logs (kubelet ? not sure because i'm using k3s wich all all k8s components embedded into one) this error about a missing /bin/sh in the container:

Apr 15 13:43:13 anytrack-1 k3s[1031]: E0415 13:43:13.364679    1031 remote_runtime.go:351] ExecSync 23edbf368bba114a96cab615c46f76f17adaf27e36675fdd618f1225ab2d313a '/bin/sh -c rm -rf /registration/csi.scaleway.com-reg.sock /csi/csi.sock' from runtime service failed: rpc error: code = Unknown desc = failed to exec in container: failed to start exec "c220a5d77843857837bd33597203f016721adf53c511948ba76c954be70f11d6": OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown

As the csi-node-driver-registrar is using a distroless image, no /bin/sh is ok.

To Reproduce

Uninstall scaleway-csi

Expected behavior

Socket /var/lib/kubelet/plugins_registry/csi.scaleway.com-reg.sock should be deleted.

Details (please complete the following information):

  • Scaleway CSI version: 0.1.1
  • Platform: Ununtu 18.04
  • Orchestrator and its version: K3S 1.17.3

Additional context

The example for csi-node-driver-registrar deployment on https://github.com/kubernetes-csi/node-driver-registrar is also broken. They also have a pending PR that should remove the socket on SIGTERM kubernetes-csi/node-driver-registrar#61

I think the hook should be removed even if means some garbage file on the nodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions