-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
runc checkpoint fails #87
Comments
Can confirm the same |
@rajasec |
(00.001638) Error (mount.c:630): 81:./dev/console doesn't h |
External terminals are not supported yet. It's not hard to implement if you need them. |
The example I tried was with the docker busybox based rootfs and runc launching the sh in it with the spec config.json. Since this is the example mentioned in this project it would be good to make it work across other commands. From initial research looks like docker's creation of console may be buggy and shares mapping with host. But I tried using the rootfs from Jerome's link in test docker file where console looks like is setup differently but fails with same. So good to have a working sample in project for criu in runc. |
https://gist.github.com/avagin/5cb08eab7d66868ea73a runc checkpoint/restore work fine with this config file. root@ubuntu:/home/avagin/git/go/src/github.com/opencontainers/runc# ./runc --criu /home/avagin/git/criu/criu checkpoint |
Let me try out |
I can confirm. It works for my setup. Comparing with your gist, the two changes needed was to make terminal as false and readonly as false. Thx for your help! |
@avagin |
Upon terminal as false in config.json Upon terminal as true in config.json This is the fd information from /proc |
@avagin |
@avagin I had cloned the latest runc too I've took the latest criu ( 1.6) |
Did you make the readonly attribute as false in the spec file as well? |
@rajasec Probably you need to mount |
@LK4D4 |
@rajasec It fails because someone has opened /dev/console. External terminals are not supported yet. |
@avagin |
It's problem of overlayfs in the linux kernel, which was fixed in 4.2.
|
@avagin |
Could you show mountinfo for a runc container and dump.log for it? |
Kernel ver:3.19 runc container info /proc/1/mountinfo output 220 97 8:5 /home/raj/go/pkg/src/github.com/opencontainers/runc/rootfs / ro,relatime - ext4 /dev/disk/by-uuid/f5a191f4-afa5-48d6-a118-47a753d5a074 rw,errors=remount-ro,data=ordered You can see that mnt_id 162 is not available in mountinfo For testing purpose I unmounted the /dev/console in container, so it tries to parse the fds. proc/1/fdinfo# cat 0 Dump.log ( from the latest criu) where it confirms that 162 is not there.. ( Not an problem with criu which I felt) For pipes ( with terminal as false): there is an different flow where criu reads the mnt_id which is on / ( in this case mnt_id 220 was used) for tty: it tries to read from /proc/fdinfo/ |
@avagin |
I already said that criu can't dump/restore containers with external termanals.You umount /dev/console, but it's not enough. Looks like the init process opened /dev/console. Could you execute the following command in your container and show output: |
@avagin Above info belong to /bin/bash which is the process ID 1 in this sample. I completely agree with you criu cant dump/restore containers with external terminal Clarification needed from you: |
I can confirm , (00.127880) Error (mount.c:1005): Can't create a temporary directory: Read-only file system error gets solved by changing
Although on restore there is no terminal messages , even though runc events shows otherwise. |
@rajasec as I already said, we don't support external terminals. In your case all descriptors point on pty. |
ttys are not support for c/t and we cannot do any changes in runc until this has some type of support in crui |
It means that checkpoint can only take effect on the container which is detached, and an interactive container is impossible to checkpoint and restore? |
I added support of external terminals in criu: |
@avagin nice! |
@avagin hello, (0.251052) 1:Warn (libnetlink.c:54): ERROR -17 reported by netlink (0.251063) 1: Error (net.c:779): Can't restore link I tried to add a --empty-ns network at the time of the restore, and then reported the wrong: (0.285898) 1: Error (criu/mount.c:3406): mnt: Unable to find real path for /run/runc/test/criu-root () Error (criu/cr-restore.c:1020): 28059 killed signal by 9: Killed (0.332568) mnt: to new to NS clean Switching (ghosts) (0.332624) uns: calling exit_usernsd (-1, 1) () uns: calls 0x457c70 (28055, -1, 1), (daemon) (0.332669) an uns: daemon exits w/ 0 (0.332940) uns: daemon stopped Version involved: Criu --version: Version: 2.6 Runc --version: Runc version 1.0.0-rc2 Spec: 1.0.0-rc3 What should I do now, can you help me to slove it? |
Could you show a config file for this container and output of "ip a" from a container? |
Before that question is Ok, the problem now is : my config : and my container ip: lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 |
Add runtime state configuration and structs
The version field was added while 180df9d (Add runtime state configuration and structs, 2015-07-29, opencontainers#87) was in-flight [1], and it missed getting documented in the example. [1]: opencontainers/runtime-spec#87 (comment) Signed-off-by: W. Trevor King <[email protected]>
Hi. I am running runc with the following config.json file.
I am facing the following error while trying to checkpoint the container:
The log file is here. Any help will be appreciated. Thanks. |
After starting my container using runc ( latest OCF format 0.1.1), I tried to do the checkpoint for my running container using
runc checkpoint
Error thrown:
criu failed: Type NOTIFY errno 0
The text was updated successfully, but these errors were encountered: