No description
Find a file
Tycho Andersen 84a89b46ad restore: correctly restore cgroup mounts inside a container
Before the nsroot= mount option, we were just getting lucky because the
cgroup superblocks "matched" when inspecting them from userspace, so we
were actually getting a bind mount from the host when migrating from within
cgroup namespaces.

Instead, let's actually do a new (i.e. not a bind mount) for cgroup
namespaces. For this, we need two things:

1. to prepare the cgroup namespace (and thus the cgroups) before the mount
   ns, so when the mount() occurrs it is relative to the right cgroup path.

2. not reject cgroup filesystems with no root. A cgroup ns mount looks
   like:

	 223 222 0:22 /lxc/unpriv /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd,nsroot=/lxc/unpriv

   i.e. it has /lxc/unpriv as its root, and thus doesn't look rooted to CRIU.
   We use the fstype->parse hook to rewrite this root to /, since it
   is handled by the cgroup ns infrastructure.

v2: add new fstype->munge hook, allowing fstypes to munge their parsed
    mountinfo entries if they want to. this allows us to get rid of the
    ugly hacks with FSTYPE__CGROUP everywhere in teh patch.
v3: s/fstype->munge/fstype->parse for FSTYPE__CGROUP

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:31 +03:00
contrib Add OverlayFS support to docker_cr.sh 2015-08-18 18:14:32 +03:00
crit crit: Add symbolic link for pycriu module 2016-03-01 12:50:47 +03:00
criu restore: correctly restore cgroup mounts inside a container 2016-04-01 18:06:31 +03:00
Documentation rework criu check logic 2016-03-25 23:39:21 +03:00
images build: images -- Add missing cleanups 2016-03-25 23:39:22 +03:00
lib build: clean up various other bits 2016-03-16 16:16:08 +03:00
scripts nmk: build.mk -- Add @libso-y helper 2016-04-01 18:06:31 +03:00
test tests: remap_dead_pid[_root] -- Run in namespace only 2016-04-01 18:06:30 +03:00
.gitignore git: ignore scripts/build/qemu-user-static/* 2016-03-16 16:16:09 +03:00
.mailmap repo: Add mailmap file 2012-03-25 23:31:20 +04:00
.travis.yml travis: execute tests from travis 2016-02-24 13:17:44 +03:00
COPYING Add LGPL licence for library directory 2013-04-01 12:29:06 +04:00
CREDITS Add the CREDITS file 2012-07-30 13:52:37 +04:00
Makefile Makefile: drop 'rebuild' from help message 2016-04-01 18:06:31 +03:00
Makefile.install build: Bring install back to life 2016-02-19 14:31:42 +03:00
Makefile.versions criu: Version 2.0 2016-03-07 20:56:59 +03:00
README.md Updated README 2015-05-19 22:38:06 +03:00

CRIU (Checkpoint and Restore in Userspace)

An utility to checkpoint/restore tasks. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space.

The project home is at http://criu.org.

Pages worth starting with are:

How to contribute