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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

commit c4f8c87 introduced the issue.

Closes: containers#1627

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@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

fix the function signature for criu_set_network_lock, and check errors
from libcriu.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the fix-criu-set-network-lock branch from cbdc622 to 588eff1 Compare December 20, 2024 08:02
@@ -907,7 +934,7 @@ libcrun_container_restore_linux_criu (libcrun_container_status_t *status, libcru
ret = libcriu_wrapper->criu_set_root (root);
if (UNLIKELY (ret != 0))
{
ret = crun_make_error (err, 0, "error setting CRIU root to `%s`", root);
ret = crun_make_error (err, -errno, "error setting CRIU root to `%s`", root);
Copy link
Contributor

Choose a reason for hiding this comment

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

Recursive grep in crun sources

$ grep -r crun_make_error . | grep ", errno," | wc -l
     477
$ grep -r crun_make_error . | grep ", -errno," | wc -l
       1
$ 

There is only one occurence of -errno. I would have expected 0, -retor errno.

@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.

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
3 participants