Skip to content

Commit 55fd6ce

Browse files
committed
fix: use timestamp for tmp-path
add # add comments
1 parent f9b7871 commit 55fd6ce

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
@@ -168,7 +168,9 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
168168
// Get mountOptions that the volume will be formatted and mounted with
169169
mountOptions := util.JoinMountOptions(mountFlags, []string{"--use-https=true"})
170170

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

0 commit comments

Comments
 (0)