[CRIU] [p.haul] [PATCH 0/2] runc container migration
Veronika Kabatova
vkabatov at redhat.com
Tue Jan 24 07:30:35 PST 2017
This patchset allows migration of a runc container without --tcp-established.
Example usage includes running `p.haul-wrap service` on target host and
`p.haul-wrap client <target-ip> runc <container-id>` on source host. No
container with the same ID should exist on the target host (a patch with checks,
bundle directory creation and cleanup in case of failed migration may follow
later).
The criu API is used directly for checkpoint and restore because the C/R
implemented in runc doesn't allow pre-dump option yet and using external
commands `runc checkpoint` and `runc restore` doesn't integrate well with
p.haul (the migration itself works, but p.haul complains about receiving
empty messages from criu and migration statistics are left out as well).
After migration of process tree itself, a directory with container status
is created with the same `state.json` file as the original container had,
just with a new ID of the root process. This is for the runc process to
acknowledge existence of the container.
The second patch from the set allows migration of containers with binded or
cgroup mounts. Using the same system as runc uses for C/R, bind and cgroup
mounts are passed to criu via the `--ext-mount-map` options
(`req.opts.ext_mnt` for Python criu API).
These changes are available also at https://github.com/veruu/p.haul/tree/runc
Veronika Kabatova (2):
Add support for migration of basic runc container
runc: Add support for bind and cgroup mounts
phaul/htype.py | 1 +
phaul/p_haul_runc.py | 260 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 261 insertions(+)
create mode 100644 phaul/p_haul_runc.py
--
2.7.4
More information about the CRIU
mailing list