Do not validate CgroupsPath in the OCI spec during restore.

The CgroupsPath is expected to change during restore. Instead we should verify
that cgroups configuration is same across checkpoint restore (by checking
spec.Linux.Resources).

PiperOrigin-RevId: 693175200
This commit is contained in:
Ayush Ranjan
2024-11-04 19:55:40 -08:00
committed by gVisor bot
parent c9be063f63
commit bcbb6a01e1
-3
View File
@@ -357,9 +357,6 @@ func validateSpecForContainer(oldSpec, newSpec *specs.Spec, cName string) error
}
// Validate specs.Linux.
if oldLinux.CgroupsPath != newLinux.CgroupsPath {
return validateError("CgroupsPath", cName, oldLinux.CgroupsPath, newLinux.CgroupsPath)
}
validateStructMap["Sysctl"] = [2]any{oldLinux.Sysctl, newLinux.Sysctl}
validateStructMap["Seccomp"] = [2]any{oldLinux.Seccomp, newLinux.Seccomp}
if err := validateDevices("Devices", cName, oldLinux.Devices, newLinux.Devices); err != nil {