Merge pull request #2276 from kolyshkin/criu-v2

cgroupv2: don't use GetCgroupMounts for criu c/r
This commit is contained in:
Mrunal Patel 2020-04-01 17:36:24 -07:00 committed by GitHub
commit e3e26cafe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -1093,6 +1093,11 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error {
case "bind":
c.addCriuDumpMount(req, m)
case "cgroup":
if cgroups.IsCgroup2UnifiedMode() {
c.addCriuDumpMount(req, m)
continue
}
// cgroup v1
binds, err := getCgroupMounts(m)
if err != nil {
return err
@ -1357,6 +1362,11 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error {
case "bind":
c.addCriuRestoreMount(req, m)
case "cgroup":
if cgroups.IsCgroup2UnifiedMode() {
c.addCriuRestoreMount(req, m)
continue
}
// cgroup v1
binds, err := getCgroupMounts(m)
if err != nil {
return err