mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Treat absent "linux" section is empty "cgroupsPath" too
This commit is contained in:
@@ -311,7 +311,10 @@ func New(conf *boot.Config, args Args) (*Container, error) {
|
||||
if isRoot(args.Spec) {
|
||||
log.Debugf("Creating new sandbox for container %q", args.ID)
|
||||
|
||||
if args.Spec.Linux != nil && args.Spec.Linux.CgroupsPath == "" {
|
||||
if args.Spec.Linux == nil {
|
||||
args.Spec.Linux = &specs.Linux{}
|
||||
}
|
||||
if args.Spec.Linux.CgroupsPath == "" {
|
||||
args.Spec.Linux.CgroupsPath = "/" + args.ID
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user