Enable checkpoint/restore of containers with TTY#38405
Conversation
|
LGTM It would be good to add a test for this. |
|
CI failure is flaky test ( It would be awesome to have some integration tests for C/R to be implemented (https://github.com/moby/moby/tree/master/integration/container is a good starting point to look at if you are up to it @rst0git), but can be done as a followup since alas currently we don't have any. @rst0git did you make sure that containerd and runc vendored in moby/moby are new enough to support tty c/r? |
Codecov Report
@@ Coverage Diff @@
## master #38405 +/- ##
==========================================
+ Coverage 36.54% 36.55% +0.01%
==========================================
Files 608 608
Lines 45040 45038 -2
==========================================
+ Hits 16458 16462 +4
+ Misses 26300 26293 -7
- Partials 2282 2283 +1 |
|
Thanks for the feedback! The integration tests for C/R is a great idea and I will look into that. |
double-checking; both are in the versions that are currently used in this repository? https://github.com/moby/moby/blob/master/hack/dockerfile/install/runc.installer#L7 |
|
0453d9a to
e4ecc54
Compare
|
@avagin Thank you implementing the integration test, I have added it to the PR. |
|
@rst0git thanks for adding the integration test, there's an error during checkpoint at line 93, doesn't seem to be related to the TTY but I think we need two test cases, one with and one without TTY |
CRIU supports checkpoint and restore of tty devices since version 2.12 which was released on 8th of March 2017. Support for this functionality was implemented with opencontainers/runc@1c43d09 (checkpoint: add support for containers with terminals) and containerd/containerd@60daa41 (Allow to checkpoint and restore a container with console). Therefore, we can enable the support in moby/docker. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
e4ecc54 to
64b3b13
Compare
@fntlnz Thanks for the feedback. This integration test is now in #38452 |
|
Derek add label: rebuild/z |
|
Hey 👋 anything still blocking this PR from making it in? Happy to help move it along if so! |
|
Looks like it just needs an integration test. |
|
Now that #38452 is in, I've gone ahead and copied @avagin's excellent work to create an integration test for a container with TTY: https://github.com/gj/moby/commit/ba7fe405355c55ebbe6e1c2db1c834b4cba92cb8 ETA: Updated with feedback from @avagin and @kolyshkin: https://github.com/gj/moby/commit/1054ee5d38678cca7687fb2fd9cd3fc87d01c018, https://github.com/gj/moby/commit/ea5974634b70b9969cee2f407a1ad9f5570a0532, https://github.com/gj/moby/commit/9065cc83a0fad7966107a6a9a1839199a22f1287 |
|
@gj Would you like to open a PR with your changes? |
|
I guess we don't lose anything if we merge this one without a test case, which can be done as a followup. @gj I suggest you open the PR with your changes (doesn't matter if it's ready for prime time or not) and mark it with |
|
Will do that tonight @kolyshkin; thanks! |
CRIU supports checkpoint and restore of tty devices since version 2.12
which was released on 8th of March 2017. Support for this functionality
was implemented with opencontainers/runc@1c43d09 (checkpoint: add
support for containers with terminals) and containerd/containerd@60daa41
(Allow to checkpoint and restore a container with console).
Therefore, we can enable the support in moby/docker.
Signed-off-by: Radostin Stoyanov rstoyanov1@gmail.com
- How to verify it