podman container checkpoint
file-locks
into the criu configuration file
Sure you can =)
That's how you normally find where image is used in CRIU code:
1) First look for an image name "pages-<id>.img":
[# criu]$ grep -r "pages-" criu
criu/image-desc.c: FD_ENTRY_F(PAGES, "pages-%u", O_NOBUF),
criu/image-desc.c: FD_ENTRY_F(PAGES_OLD, "pages-%d", O_NOBUF),
criu/image-desc.c: FD_ENTRY_F(SHM_PAGES_OLD, "pages-shmem-%ld", O_NOBUF),
2) Se what FD_ENTRY_F is:
[# criu]$ git grep -A1 "#define FD_ENTRY_F"
criu/image-desc.c:#define FD_ENTRY_F(_name, _fmt, _f) \
criu/image-desc.c- [CR_FD_##_name] = {
3) Look for CR_FD_PAGES open:
[# criu]$ git grep open.*CR_FD_PAGES
criu/image.c: return open_image_at(dfd, CR_FD_PAGES, flags, *id);
criu/mem.c: pages = open_image(CR_FD_PAGES, opts.auto_dedup ? O_RDWR : O_RSTR, rsti(t)->pages_img_id);
One is in prepare_vma_ios() and another is in open_pages_image_at().
4) Vim cctree plugin says prepare_vma_ios() is on restore:
+-< prepare_vma_ios
+-< prepare_vmas
| +-< restore_one_alive_task
| | +-< restore_one_task
5) open_pages_image_at() is both dump and restore
Hi there,
First of all, CRIU looks like a very cool project. Using the out of the box "criu" CLI was super easy and appears to do what I want (checkpoint a TCP connection, and restore it somewhere else, I for now, tried to do this by just restoring a docker container using the guide on criu.org) however my goal is to move this functionality to a application running in a kubernetes pod, which can than be used to "transfer" a TCP connection from my kubernetes pod to another kubernetes pod whenever a pod gets rebalanced.
I learned that libsoccr has been build to exactly do this, so I'm trying to build a little C application that simulates a TCP client/server connetion, and uses libsoccr to checkpoint/restore the TCP connection of the client. Now the last time that I used C is years ago, so I am really struggling getting the libsoccr.a library linked to my "demo-app".
I tried the following:
However it is failing trying to find libnet_init.
Now I am guessing that I am linking the project incorrectly (as I probably also have to link libnet and other dependencies) but I am afraid I have to admit that I'm not really sure how to go from here as my C skills are lacking here.
Anyone that can lead me in the right direction // is there maybe a demo application on github somewhere that demonstrates how to use libsoccr as a standalone library?
Help would be really appreciated, I hope that I am not annoying you with my beginner-questions.
Hi all,
I have been trying to setup CRIU v3.13 inside a privileged docker container (A dockerized CRIU Image is bundled as part of the Dockerfile on an Alpine Linux Base) to checkpoint a certain process. The containers run inside a Kubernetes cluster on a fresh install of Ubuntu 20.04 LTS.
I have done some sanity checks, namely running the criu check
command from within the container. Apart from criu check
, I have checked for various privilege accesses and all come back positive.
The criu check
command returns the following:
Error (criu/util.c:610): exited, status=1
Error (criu/util.c:610): exited, status=1
Warn (criu/kerndat.c:839): Can't keep kdat cache on non-tempfs
Looks good.
I am currently trying to get the simple loop
example (https://criu.org/Simple_loop) working. After following the instructions, I see that dumping the process fails with error code -1.
pie: 52: Warn (criu/pie/parasite.c:648): /proc/self/cgroup was bigger than the page size
pie: 52: __sent ack msg: 76 76 -1
pie: 52: Close the control socket for writing
(00.037284) Fetched ack: 76 76 -1
pie: 52: Daemon waits for command
(00.037294) Error (compel/src/lib/infect-rpc.c:72): Command 76 for daemon failed with -1
(00.037305) Error (criu/parasite-syscall.c:447): Parasite failed to dump /proc/self/cgroup
I haven't had much success in finding a solution to the problem in the GitHub issues, and I'd really appreciate it if you could point me in the right direction.