-
Notifications
You must be signed in to change notification settings - Fork 316
cr: use the RPC protocol for communication with criu #486
Conversation
That's really awesome. |
@avagin @mrunalp |
@SaiedKazemi , yes but swrk mode itself exists in older versions too (it appeared in 1.2). AFAIU the only reason for 1.6 is that inherit-fd option will appear. Is absence of inherit-fd a blocker? I mean, will it be impossible to C/R anything without it? |
@xemul, without inherit-fd support docker logs will not work. I assume most use cases would want this functionality. But I am not the best person to answer the question whether it's a blocker or not. |
@SaiedKazemi , I see. So without swrk's inherit_fd C/R in libcontainer will have to work with CRIU's CLI to be usable. I've looked at the patch to CRIU @avagin has sent. I think we can make CRIU 1.5.1 with this patch to make swrk mode usable for libcontainer. All the more so we will have an issue with newer kernel soon that was fixed by Oleg Nesterov from RedHat. |
👍 I just noticed that Fedora 21 has criu 1.3.1 Does it mean that the libcontainer criu integration won't work on it? I also see that @avagin is maintaining the criu packages on Fedora. Would it be possible to support newer versions of criu on Fedora 21 (it has kernel 3.19 now)? |
That's a bummer. For restore to be fully functional, we needed two options that were added to CRIU v1.4. The --inherit-fd option (0412152fc5) and extending the already existing --veth-pair option (296129295a). This means that the CRIU command line options in the new libcontainer will not work with 1.3.1. |
@mrunalp @SaiedKazemi @xemul I am going to update CRIU in FC21. Ubuntu has CRIU 1.3.1 too. We need to update CRIU there too. So I think we can realease criu 1.5.1 and use criu swrk in libcontainer. root@ubuntu:/home/avagin# criu -V |
OK, so the next steps would be 1.5.1 and Fedora's package update :) |
73c55ec
to
c58d357
Compare
So, the criu-1.5.1 is out :) Feel free to pick one up and use! |
I think this request is ready to be merged. @SaiedKazemi @crosbymichael @LK4D4 @mrunalp could you review this? |
@avagin @crosbymichael @LK4D4 @mrunalp @xemul In the background, I am working with Pavel and Tycho Andersen of Canonical to prevent CRIU's temporary cgyard mount points leaking into the container. But this should not be a show stopper for merging this PR. |
@avagin @SaiedKazemi Thanks! Yes, I will try this out and add review comments if any (hopefully by tomorrow). |
a062638
to
0797e7b
Compare
@SaiedKazemi This request is only about criu swrk. I agree that a user should be able to specify a checkpoint directory. As for cgyard I think it's a good to split workdir and imagedir. In this case the problem with cgyard will disapear, if I don't mess something. I have added a commit which sets a separate directory as workdir for criu. |
@avagin Great. With your commit to pass an image directory outside container's root, we won't need to change CRIU. |
The image directory should never be inside the container's root. That is just an implementation detail of running nsinit from the current dir. you can change it via |
@crosbymichael @avagin said that he already has a commit that passes the image directory path to both Checkpoint() and Restore(). |
@SaiedKazemi you misunderstood me. I split imagedir and workdir. workdir contains temporary files. imagedir is required for restoring a container. Pls, take a look at avagin@0797e7b |
I built criu 1.5.1 on F21 and I see a failure when I try to checkpoint a container
|
I am also seeing the same failure on the criu branch (without these changes). |
@avagin Could we clean up the commit history a bit? It is difficult to load the entire PR in a web page so going commit by commit to review. However, I see that some code was removed in later commits. |
@avagin Up to you though, I can manage either ways :) |
@SaiedKazemi container.root is not We dont' have to worry about the TTY usecase because it's not common and we can keep this morning and get it merged soon. TTY is a nice to have, not a requirement by a long shot. |
@crosbymichael What I see is: |
@SaiedKazemi I would recomend you to use the --root option. Default values cannot be suitable for all cases. |
Lets change the default so it's less confusing when testing |
I opened #507 to change it so it's less confusing for people. |
Ok, it's merged and I also rebased the |
In this case CRIU will exit after restoring processes. Here is no reason to wait the init process. Signed-off-by: Andrey Vagin <[email protected]>
Signed-off-by: Andrey Vagin <[email protected]>
Signed-off-by: Andrey Vagin <[email protected]>
criu swrk is a special mode when we don't want to execute a service, but want to use RPC. Here is more details: http://lists.openvz.org/pipermail/criu/2015-March/019400.html Another good feature of this mode is that we don't need to create action scripts and we will be able to remove the hack with saving StdFds. criu swrk is supported starting with CRIU 1.5.1. Signed-off-by: Andrey Vagin <[email protected]>
CRIU version must be 1.5.1 or higher Signed-off-by: Andrey Vagin <[email protected]>
This directory can be removed when criu completes. Signed-off-by: Andrey Vagin <[email protected]>
@crosbymichael I've rebased this branch too. |
Everything must be in vendor/ Signed-off-by: Andrey Vagin <[email protected]>
@crosbymichael @avagin Anything to do for this PR to merge? Also, what needs to be done for the criu branch to merge into master? |
@crosbymichael @SaiedKazemi I think we can merge it into the criu branch. |
Spoke offline with @SaiedKazemi and I'll go ahead and merge this into the CRIU branch. We've been more open with allowing some development like this in branches before we merge into master (same as we did for the API branch). Let me know if you completely disagree @crosbymichael, but I think this is Kosher from what we've done before :) |
cr: use the RPC protocol for communication with criu
@vmarmol your a maintainer just like me, no worries ;) |
@vmarmol @crosbymichael |
criu swrk will be supported starting with CRIU 1.6 (1 June 2015), so this patch is only for review by now.
criu swrk is a special mode when we don't want to execute a service, but want to use RPC.
Here is more details:
http://lists.openvz.org/pipermail/criu/2015-March/019400.html
criu swrk allows to remove the hack with saving StdFds. And in future, we will be able to handle notifications from CRIU without additional scripts.
Jenkins will fail because goprotobuf are not added in dependencies.
Cc: @SaiedKazemi