Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata: Add DevShmCheckpointTar #13

Merged
merged 1 commit into from
Dec 4, 2021

Conversation

rst0git
Copy link
Member

@rst0git rst0git commented Dec 3, 2021

When Podman is running a container in private IPC mode (default), it creates a bind mount for /dev/shm that is attached to a tmpfs folder on the host file system. However, checkpointing a container has the side-effect of stopping that container and unmount the tmpfs used for /dev/shm. As a result, after checkpoint all files stored in the container's /dev/shm would be lost and the container restore might fail.

To address this problem, this commit defines a metadata tar file that could be used to store the content of /dev/shm, include it in the container checkpoint, and restore it.

When Podman is running a container in private IPC mode (default),
it creates a bind mount for /dev/shm that is attached to a tmpfs
folder on the host file system. However, checkpointing a container
has the side-effect of stopping that container and unmount the tmpfs
used for /dev/shm. As a result, after checkpoint all files stored in
the container's /dev/shm would be lost and the container restore might
fail.

To address this problem, this commit defines a metadata tar file that
could be used to store the content of /dev/shm, include it in the
container checkpoint, and restore it.

Signed-off-by: Radostin Stoyanov <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #13 (ee19286) into main (7ab6709) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #13   +/-   ##
=======================================
  Coverage   58.06%   58.06%           
=======================================
  Files           4        4           
  Lines         589      589           
=======================================
  Hits          342      342           
  Misses        210      210           
  Partials       37       37           
Impacted Files Coverage Δ
lib/metadata.go 54.08% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ab6709...ee19286. Read the comment docs.

@adrianreber adrianreber merged commit 54b4ebf into checkpoint-restore:main Dec 4, 2021
@rst0git rst0git deleted the dev-shm branch December 4, 2021 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants