opencontainers / opencontainers/runc

Feature request: external fds on checkpoint/restore

Open
#2,187 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Description

Hello. My project has a requirement that we want to pass a FD to a container process and then checkpoint it. On checkpoint/restore the FD cannot be dumped because it is outside the container's mount namespace, so we need to specify it as an "external" FD in CRIU and pass the FD back on restore.
In CRIU this is achieved by specifying --external option on dump and --inherit-fd on restore. However, these options are missing from runc checkpoint and runc restore.
I found that there was already code in runc for dealing with criu --external options, but these options were not exposed to the user. I tried to implement them but it seems like my code has no effect at all. The patch is at https://github.com/vincent-163/runc/commit/36ee61464ff4e138aea46ffe8651569471fe9349.
Could someone please at least point me at the right direction so I know how I would be able to implement that by myself? Thanks in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked commit and the runc checkpoint and restore command entry points. Trace how CRIU options are currently assembled, then verify that external FD and inherited FD arguments reach CRIU; done means both commands expose the requested options and checkpoint/restore uses them successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.