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

criu: do not set network_lock if not specified #1628

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Dec 19, 2024

commit c4f8c87 introduced the issue.

also improve error handling from criu APIs

Closes: #1627

@giuseppe
Copy link
Member Author

@lsm5 the failures depend on some broken dependencies:

 Problem: problem with installed package lld-libs-18.1.8-1.el9.x86_64
  - cannot install the best update candidate for package lld-libs-18.1.8-1.el9.x86_64
  - package lld-libs-19.1.3-1.el9.x86_64 from appstream requires llvm-libs(x86-64) = 19.1.3-1.el9, but none of the providers can be installed
  - cannot install the best update candidate for package llvm-libs-19.1.5-2.el9.x86_64
  - cannot install both llvm-libs-19.1.3-1.el9.x86_64 from appstream and llvm-libs-19.1.5-2.el9.x86_64 from @System

@giuseppe giuseppe force-pushed the fix-criu-set-network-lock branch from cbdc622 to 588eff1 Compare December 20, 2024 08:02
src/libcrun/criu.c Outdated Show resolved Hide resolved
@lsm5
Copy link
Member

lsm5 commented Dec 23, 2024

@giuseppe

Re: cs10, I'll do something about the catatonit dependency.

Re: rhel9, we've removed rhel jobs from our other projects because of older packages causing frequent failures. CentOS Stream works mostly well upstream.

Re: cs9, llvm 19.1.5 has been built already https://kojihub.stream.centos.org/koji/packageinfo?packageID=1160 so I guess just a matter of time before it lands in the repos. Your call if you wanna block or proceed with this PR. I can check with the maintainers about ETA, but I doubt they'd know the exact dates.


ret = libcriu_wrapper->criu_dump ();
if (UNLIKELY (ret != 0))
return crun_make_error (err, 0,
return crun_make_error (err, -ret,
Copy link
Contributor

Choose a reason for hiding this comment

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

I tried to look in the criu source code to see what kind of values criu_dump() could return.
I followed the functions:

int criu_dump(void)
which calls
int criu_local_dump(criu_opts *opts)
which calls
static int dump(bool pre_dump, criu_opts *opts)

Maybe the return value could be 1 if it comes from

https://github.com/checkpoint-restore/criu/blob/32d5a766eeb8a41e52a1c0234bbf2c5757f64b4b/lib/c/criu.c#L1580
?
Using -1 as second argument of crun_make_error() causes that function to return 0 which would be surprising.

return -status - 1;

Sorry, this comment is a bit vague. I haven't found any reproducer for the mentioned scenario to happen.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, fixed, to return the error only with ret < 0.

@giuseppe giuseppe force-pushed the fix-criu-set-network-lock branch 3 times, most recently from cac4bf6 to 2ff6779 Compare January 7, 2025 08:58
@giuseppe
Copy link
Member Author

giuseppe commented Jan 7, 2025

CI failure being addressed in: #1634

commit c4f8c87 introduced the issue.

Closes: containers#1627

Signed-off-by: Giuseppe Scrivano <[email protected]>
fix the function signature for criu_set_network_lock, and check errors
from libcriu.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe giuseppe force-pushed the fix-criu-set-network-lock branch from 2ff6779 to 3158e49 Compare January 7, 2025 15:47
@giuseppe
Copy link
Member Author

giuseppe commented Jan 8, 2025

@adrianreber @flouthoc PTAL

Copy link
Contributor

@adrianreber adrianreber left a comment

Choose a reason for hiding this comment

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

Looks good. The network locking seems to be now correct and the return code checking is also a good addition.

@giuseppe giuseppe merged commit 6f010b5 into containers:main Jan 8, 2025
47 checks passed
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.

network lock method for checkpoint/restore defaults to iptables
4 participants