Skip to content
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

Support criu-image-streamer through RPC #2533

Closed

Conversation

lianakoleva
Copy link

Programs calling CRIU through RPC may want access to image streaming
for faster data transfer.

To use image streaming through RPC,
(1) criu-image-streamer must be started by the calling program.
(2) The RPC call must enable stream in criu_opts.

Programs calling CRIU through RPC may want access to image streaming
for faster data transfer.

To use image streaming through RPC,
(1) criu-image-streamer must be started by the calling program.
(2) The RPC call must enable stream in `criu_opts`.

Signed-off-by: Liana Koleva <[email protected]>
@lianakoleva lianakoleva force-pushed the rpc_support_img_streamer branch from 147a50b to 0f05b59 Compare November 26, 2024 20:28
@rst0git rst0git self-requested a review December 3, 2024 20:51
@@ -905,7 +901,7 @@ static int check(int sk, CriuOpts *req)
__setproctitle("check --rpc");

opts.mode = CR_CHECK;
if (setup_opts_from_req(sk, req))
if (setup_opts_from_req(sk, req, -1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add a comment that explains why we use -1 here?

@@ -1015,7 +1011,7 @@ static int start_page_server_req(int sk, CriuOpts *req, bool daemon_mode)
close(start_pipe[0]);

opts.mode = CR_PAGE_SERVER;
if (setup_opts_from_req(sk, req))
if (setup_opts_from_req(sk, req, -1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to add a similar comment here.

criu/cr-service.c Outdated Show resolved Hide resolved
@rst0git
Copy link
Member

rst0git commented Dec 3, 2024

@lianakoleva Would it be possible to run tests for this functionality with ZDTM?

For example, something similar to ./zdtm.py run -t zdtm/static/env00 --rpc --stream?

Parameter `int mode` conflicts with another variable in this
function.

Signed-off-by: Liana Koleva <[email protected]>
The `image_dir_mode` function was modified to base output on opts.mode
only. This required changes to accommodate for CR_CPUINFO, which has a
subcommand.

Signed-off-by: Liana Koleva <[email protected]>
@lianakoleva lianakoleva closed this Dec 6, 2024
@lianakoleva lianakoleva deleted the rpc_support_img_streamer branch December 6, 2024 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants