Fix cgroups path for base OCI spec

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2020-05-29 11:40:12 -07:00
parent df8d6c5b7b
commit 17c61e36cb
2 changed files with 7 additions and 1 deletions

View File

@@ -313,7 +313,10 @@ func (c *criService) runtimeSpec(id string, baseSpecFile string, opts ...oci.Spe
return nil, errors.Wrap(err, "failed to clone OCI spec")
}
if err := oci.ApplyOpts(ctx, nil, container, &spec, opts...); err != nil {
// Fix up cgroups path
applyOpts := append([]oci.SpecOpts{oci.WithNamespacedCgroup()}, opts...)
if err := oci.ApplyOpts(ctx, nil, container, &spec, applyOpts...); err != nil {
return nil, errors.Wrap(err, "failed to apply OCI options")
}