diff --git a/client/allocrunner/taskrunner/volume_hook.go b/client/allocrunner/taskrunner/volume_hook.go index 7d33d74e366f..c84b891e1df8 100644 --- a/client/allocrunner/taskrunner/volume_hook.go +++ b/client/allocrunner/taskrunner/volume_hook.go @@ -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) } @@ -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) }