Skip to content

kubevirt-csi node: the temp NFS unmount has no timeout and hangs when the NFS server is gone #4561

Closed

Description

When the kubevirt-csi node plugin fails to unmount its temporary NFS mount, the mount is left behind and nothing reclaims it.

The NFS publish path in packages/apps/kubernetes/images/kubevirt-csi-driver/node.go temp-mounts the export root into a dir from os.MkdirTemp and unmounts it in a defer. If that unmount fails, the code logs a warning and moves on. Nothing retries it or cleans it up later, so the NFS root stays mounted inside the node plugin container, one mount per failed unmount.

Retrying the unmount, or sweeping leftover nfs-init-* dirs when the plugin starts, would close it. I found this while fixing #4466, and that fix only makes the removal failure that follows visible in the log.

Activity

  1. changed the title [-]kubevirt-csi node: a failed unmount of the temp NFS mount leaks the mount[/-] [+]kubevirt-csi node: the temp NFS unmount has no timeout and hangs when the NFS server is gone[/+] on Sep 29, 2026
  2. lexfrei commented on Sep 29, 2026

    @lexfrei
    ContributorAuthor

    I narrowed the title to the case this actually hits. With the NFS server gone, a plain umount of the temp mount blocks instead of failing, so the fix is a timeout followed by a retry with -f. A sweep of nfs-init-* dirs on startup would find nothing: /tmp in the node plugin container has no hostPath, so leaked mounts go away when the container restarts. The same hang can also happen earlier in the publish path, before the unmount. That part is #4581.

  3. added a commit that references this issue on Oct 7, 2026
    52aa837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions