spiegel_podman/docs/source
Radostin Stoyanov 31dad50824
Freeze cgroup during live checkpoint
When checkpointing a container with --leave-running, libpod dumps the
container's memory via the OCI runtime (CRIU) first and only captures
the rootfs diff and named volumes afterwards. CRIU thaws the container
as soon as the memory dump finishes, so the processes inside the
container continue to run between the memory snapshot and the
file-system capture. As a result, the checkpoint can be inconsistent:
have CRIU images and a file system that reflect different points in time.

To fix this, we freeze the container's cgroup before invoking the OCI
runtime and thaw it again only after the checkpoint image/archive has
been written. The OCI runtime calls CRIU with the freezer cgroup and
restores it to its previous state once the dump completes, so a
container that was already frozen stays frozen across the dump and
the file system is captured at the same instant as the CRIU images.
This mirrors the approach other engines (e.g. CRI-O and containerd).

The default (stopping) checkpoint functionality is not affected by this
issue because CRIU leaves the tasks dead after the dump.

This patch also adds a regression test for the consistency of live
(--leave-running) checkpoints. The container runs a workload that
keeps an in-memory counter in sync with a value written to a file
on its root file system, maintaining the invariant that the on-disk
value never gets ahead of the in-memory counter.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
(cherry picked from commit 2c7aeab70b)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-24 14:08:33 +02:00
..
_static build the swagger.yml on readthedocs 2026-06-24 14:07:49 +02:00
locale/ja/LC_MESSAGES [DOCS] Update references common -> container-libs/common 2026-02-04 21:29:17 +10:00
markdown Freeze cgroup during live checkpoint 2026-06-24 14:08:33 +02:00
Commands.rst Initial implementation of podman quadlet commands 2025-07-18 13:57:11 -07:00
conf.py Revert "docs: generate Reference version list from json file" 2026-06-24 14:07:48 +02:00
includes.rst add containerfile doc link 2025-09-19 17:18:45 -04:00
index.rst [CI:DOCS] Add link to podman py docs 2023-11-17 07:18:59 -05:00
Introduction.rst add containerfile doc link 2025-09-19 17:18:45 -04:00
Reference.rst build the swagger.yml on readthedocs 2026-06-24 14:07:49 +02:00
Search.rst [CI:DOCS] Docs revamp. 2020-05-21 17:16:10 -04:00
Tutorials.rst fix typo in Tutorials.rst 2024-05-23 16:15:40 +01:00