Merge pull request #5737 from thaJeztah/remove_redundant_check

runtime: runc v2: remove redundant validation
This commit is contained in:
Fu Wei 2021-07-15 23:06:45 +08:00 committed by GitHub
commit e830c5364c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,9 +257,6 @@ func (s *service) StartShim(ctx context.Context, opts shim.StartOpts) (_ string,
if opts, ok := v.(*options.Options); ok {
if opts.ShimCgroup != "" {
if cgroups.Mode() == cgroups.Unified {
if err := cgroupsv2.VerifyGroupPath(opts.ShimCgroup); err != nil {
return "", errors.Wrapf(err, "failed to verify cgroup path %q", opts.ShimCgroup)
}
cg, err := cgroupsv2.LoadManager("/sys/fs/cgroup", opts.ShimCgroup)
if err != nil {
return "", errors.Wrapf(err, "failed to load cgroup %s", opts.ShimCgroup)