Skip to content

Commit 1a91024

Browse files
authored
Merge pull request #2689 from k8s-infra-cherrypick-robot/cherry-pick-2687-to-release-1.33
[release-1.33] fix: intree volume unmount failure
2 parents 54cab65 + f7fb973 commit 1a91024

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/azurefile/nodeserver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ func (d *Driver) NodeUnpublishVolume(_ context.Context, req *csi.NodeUnpublishVo
219219
// Remove deletes the direct volume path including all the files inside it.
220220
// if there is no kata-cc mountinfo present on this path, it will return nil.
221221
if err := d.directVolume.Remove(targetPath); err != nil {
222+
if strings.Contains(err.Error(), "file name too long") {
223+
klog.Warningf("NodeUnpublishVolume: direct volume mount info %s not found on %s, ignoring error", volumeID, targetPath)
224+
return &csi.NodeUnpublishVolumeResponse{}, nil
225+
}
222226
return nil, status.Errorf(codes.Internal, "failed to direct volume remove mount info %s: %v", targetPath, err)
223227
}
224228
}

0 commit comments

Comments
 (0)