Merge pull request #9768 from mheon/fix_9608

Ensure manually-created volumes have correct ownership
This commit is contained in:
OpenShift Merge Robot
2021-03-25 03:09:25 -07:00
committed by GitHub
4 changed files with 28 additions and 14 deletions

View File

@ -1618,19 +1618,6 @@ func WithVolumeGID(gid int) VolumeCreateOption {
}
}
// WithVolumeNeedsChown sets the NeedsChown flag for the volume.
func WithVolumeNeedsChown() VolumeCreateOption {
return func(volume *Volume) error {
if volume.valid {
return define.ErrVolumeFinalized
}
volume.state.NeedsChown = true
return nil
}
}
// withSetAnon sets a bool notifying libpod that this volume is anonymous and
// should be removed when containers using it are removed and volumes are
// specified for removal.