-
Notifications
You must be signed in to change notification settings - Fork 695
feature:support live-restore #4474
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
base: main
Are you sure you want to change the base?
Conversation
36e64b2
to
0801fee
Compare
d11a608
to
f4c0f71
Compare
8b9cb17
to
b3ef6e5
Compare
pkg/logging/container_wait_linux.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about non-linux unix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to connect unix shim or windows shim, does containerd-shim-runc-v2 works well on unix? @AkihiroSuda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config := &Config{
ID: os.Getenv("CONTAINER_ID"),
Namespace: os.Getenv("CONTAINER_NAMESPACE"),
Stdout: os.NewFile(3, "CONTAINER_STDOUT"),
Stderr: os.NewFile(4, "CONTAINER_STDERR"),
}
I'm trying to find a way to avoid call task.Wait or call shim api.
if container main process exited. the pipe reader should know the writer is closed. but I can't find a good way to know pipe writer is closed. @AkihiroSuda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I try get EPOLLHUP event but it doesn’t work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another way is to monitor /proc/container_pid to know container exited.
b3ef6e5
to
59154c0
Compare
Signed-off-by: ningmingxiao <[email protected]>
59154c0
to
30006b4
Compare
nerdctl old version call task.Wait to wait container stop, but if containerd stop task.Wait will return. So I find a better way to solve this we can let nerdctl call shim api to get container status.