Closed andyzhangx closed 1 month 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
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
pkg/nfs/controllerserver.go | 1 | 3 | 33.33% | ||
<!-- | Total: | 1 | 3 | 33.33% | --> |
Totals | |
---|---|
Change from base Build 9026157020: | -0.1% |
Covered Lines: | 888 |
Relevant Lines: | 1127 |
What type of PR is this? /kind bug
What this PR does / why we need it: fix: remove stale archived volume copy before rename
The user might put non-unique spec for subdir:
Then,
os.Rename(internalVolumePath, archivedInternalVolumePath)
can fail becaue the destination (archivedInternalVolumePath
) already exists. It's safer to remove it beforeos.Rename()
.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: