• Tycho Andersen's avatar
    cgroup: support --cgroup-root on dump too · cb19e69e
    Tycho Andersen authored
    The problem here is again caused by systemd :). Every process lives in some
    child cgroup and not the root one, so we end up with a bunch of stuff like:
    
    /init.scope
    /system.slice/...
    /user.slice/...
    
    and nothing in the root cgroup. However, systemd opens
    /sys/fs/cgroup/systemd, changes the perms, and keeps a fd around.
    Unfortuantely, we don't track the perms on the "real root" cgroup here,
    because nothing is at that level, so when we restore, our cgroup perms
    changing code doesn't catch this perms change, and we get:
    
    (00.361723)      1: Error (criu/files-reg.c:1487): File sys/fs/cgroup/systemd has bad mode 040755 (expect 040775)
    
    To fix this, let's just support the --cgroup-root argument on dump too, and
    rewrite the cgroup paths we dump accordingly.
    Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    cb19e69e
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
lib Loading commit data...
scripts Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...