diff options
author | Nicolas Viennot <Nicolas.Viennot@twosigma.com> | 2020-05-21 20:40:17 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-10-20 10:18:24 +0300 |
commit | 7d79a58f4daa9ddda015fc0aaca2a60d156d12cc (patch) | |
tree | 57d69718d53db9ba64b5f3610572aed4a85c5b50 /images | |
parent | 51c3f8a908b1738d7d268afc5bb0dd9a59f3d8a5 (diff) |
img-streamer: introduction of criu-image-streamer
This adds the ability to stream images with criu-image-streamer
The workflow is the following:
1) criu-image-streamer is started, and starts listening on a UNIX
socket.
2) CRIU is started. img_streamer_init() is invoked, which connects to the
socket. During dump/restore operations, instead of using local disk to
open an image file, img_streamer_open() is called to provide a UNIX pipe
that is sent over the UNIX socket.
3) Once the operation is done, img_streamer_finish() is called, and the
UNIX socket is disconnected.
criu-image-streamer can be found at:
https://github.com/checkpoint-restore/criu-image-streamer
Signed-off-by: Nicolas Viennot <Nicolas.Viennot@twosigma.com>
Diffstat (limited to 'images')
-rw-r--r-- | images/Makefile | 1 | ||||
-rw-r--r-- | images/img-streamer.proto | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/images/Makefile b/images/Makefile index 5ddd37664..bc67278e6 100644 --- a/images/Makefile +++ b/images/Makefile @@ -65,6 +65,7 @@ proto-obj-y += macvlan.o proto-obj-y += sit.o proto-obj-y += memfd.o proto-obj-y += timens.o +proto-obj-y += img-streamer.o CFLAGS += -iquote $(obj)/ diff --git a/images/img-streamer.proto b/images/img-streamer.proto new file mode 100644 index 000000000..d1bd4cc19 --- /dev/null +++ b/images/img-streamer.proto @@ -0,0 +1,16 @@ +syntax = "proto2"; + +// This message is sent from CRIU to the streamer. +// * During dump, it communicates the name of the file that is about to be sent +// to the streamer. +// * During restore, CRIU requests image files from the streamer. The message is +// used to communicate the name of the desired file. +message img_streamer_request_entry { + required string filename = 1; +} + +// This message is sent from the streamer to CRIU. It is only used during +// restore to report whether the requested file exists. +message img_streamer_reply_entry { + required bool exists = 1; +} |