Skip to content

Commit

Permalink
backport of commit 3e2bed0
Browse files Browse the repository at this point in the history
  • Loading branch information
shumin1027 committed Jan 29, 2023
1 parent 3d5a695 commit 1233d15
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions client/allocrunner/taskrunner/volume_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ func (h *volumeHook) hostVolumeMountConfigurations(taskMounts []*structs.VolumeM
}

mcfg := &drivers.MountConfig{
HostPath: hostVolume.Path,
TaskPath: m.Destination,
Readonly: hostVolume.ReadOnly || req.ReadOnly || m.ReadOnly,
HostPath: hostVolume.Path,
TaskPath: m.Destination,
Readonly: hostVolume.ReadOnly || req.ReadOnly || m.ReadOnly,
PropagationMode: m.PropagationMode,
}
mounts = append(mounts, mcfg)
}
Expand Down Expand Up @@ -171,9 +172,10 @@ func (h *volumeHook) prepareCSIVolumes(req *interfaces.TaskPrestartRequest, volu

for _, m := range mountsForAlias {
mcfg := &drivers.MountConfig{
HostPath: csiMountPoint.Source,
TaskPath: m.Destination,
Readonly: request.ReadOnly || m.ReadOnly,
HostPath: csiMountPoint.Source,
TaskPath: m.Destination,
Readonly: request.ReadOnly || m.ReadOnly,
PropagationMode: m.PropagationMode,
}
mounts = append(mounts, mcfg)
}
Expand Down

0 comments on commit 1233d15

Please sign in to comment.