kubernetes-csi / csi-driver-nfs

This driver allows Kubernetes to access NFS server on Linux node.
Apache License 2.0
872 stars 252 forks source link

fix: delete volume error in archive deletion mode #754

Closed andyzhangx closed 2 months ago

andyzhangx commented 2 months ago

What type of PR is this? /kind bug

What this PR does / why we need it: fix: delete volume error in archive deletion mode

when onDelete: archive, there could be delete volume error with error msg rename xxx: no such file or directory since there is a bug in csi-provisioner that DeleteVolume may be performed twice, this PR adds a 1 min cache and lock to workaround this issue.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix: delete volume error in archive deletion mode
k8s-ci-robot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-csi/csi-driver-nfs/blob/master/OWNERS)~~ [andyzhangx] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10652044575

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/nfs/nfs.go 1 3 33.33%
pkg/nfs/controllerserver.go 11 20 55.0%
<!-- Total: 12 23 52.17% -->
Totals Coverage Status
Change from base Build 10641312236: -0.5%
Covered Lines: 914
Relevant Lines: 1170

💛 - Coveralls