Skip to content

Commit 3a9dd2d

Browse files
authored
Merge pull request #299 from andyzhangx/tmppath-fix-v0.7
fix: use timestamp for tmp-path to v0.7
2 parents 3aeba81 + e5eab41 commit 3a9dd2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/blob/nodeserver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
170170
// Get mountOptions that the volume will be formatted and mounted with
171171
mountOptions := util.JoinMountOptions(mountFlags, []string{"--use-https=true"})
172172

173-
args := targetPath + " " + "--tmp-path=/mnt/" + volumeID + " " + "--container-name=" + containerName
173+
// set different tmp-path with time info
174+
tmpPath := fmt.Sprintf("%s/%s#%d", "/mnt", volumeID, time.Now().Unix())
175+
args := fmt.Sprintf("%s --tmp-path=%s --container-name=%s", targetPath, tmpPath, containerName)
174176
for _, opt := range mountOptions {
175177
args = args + " " + opt
176178
}

0 commit comments

Comments
 (0)