From bcbb6a01e13bfe0e0fdd9012c750316227a39274 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Mon, 4 Nov 2024 19:52:34 -0800 Subject: [PATCH] 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 --- runsc/boot/restore.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/runsc/boot/restore.go b/runsc/boot/restore.go index df86e8d3b..a67d55981 100644 --- a/runsc/boot/restore.go +++ b/runsc/boot/restore.go @@ -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 {