Skip to content

kubevirt-csi node: temp NFS mount dir removal error is ignored #4466

Closed

Description

The kubevirt-csi node service ignores the error from removing its temporary NFS mount directory. NodePublishVolume in packages/apps/kubernetes/images/kubevirt-csi-driver/node.go creates the directory with os.MkdirTemp, mounts the NFS root there, and cleans up with defer os.Remove(tmpMount). golangci-lint flags that line (errcheck).

The deferred unmount runs first. If it fails, the unmount error is logged, but os.Remove then fails on a busy mount point and nothing reports it, so the directory stays behind in the node's temp dir. Checking the error and logging it would be enough. The repo runs no lint gate, so nothing catches this today.

Activity

  1. added
    kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debt
    area/kubernetesIssues or PRs related to the tenant Kubernetes app
    on Sep 24, 2026
  2. added a commit that references this issue on Oct 5, 2026
    c7b8009
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

    area/kubernetesIssues or PRs related to the tenant Kubernetes appkind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debttriage/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