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

[19.03 backport] daemon: add grpc.WithBlock option #40555

Merged
merged 1 commit into from
Feb 22, 2020

Conversation

fuweid
Copy link
Contributor

@fuweid fuweid commented Feb 22, 2020

WithBlock makes sure that the following containerd request is reliable.

In one edge case with high load pressure, kernel kills dockerd, containerd
and containerd-shims caused by OOM. When both dockerd and containerd
restart, but containerd will take time to recover all the existing
containers. Before containerd serving, dockerd will failed with gRPC
error. That bad thing is that restore action will still ignore the
any non-NotFound errors and returns running state for
already stopped container. It is unexpected behavior. And
we need to restart dockerd to make sure that anything is OK.

It is painful. Add WithBlock can prevent the edge case. And
n common case, the containerd will be serving in shortly.
It is not harm to add WithBlock for containerd connection.

Signed-off-by: Wei Fu [email protected]
(cherry picked from commit 9f73396)
Signed-off-by: Wei Fu [email protected]

From #40137
Fix: #40554

WithBlock makes sure that the following containerd request is reliable.

In one edge case with high load pressure, kernel kills dockerd, containerd
and containerd-shims caused by OOM. When both dockerd and containerd
restart, but containerd will take time to recover all the existing
containers. Before containerd serving, dockerd will failed with gRPC
error. That bad thing is that restore action will still ignore the
any non-NotFound errors and returns running state for
already stopped container. It is unexpected behavior. And
we need to restart dockerd to make sure that anything is OK.

It is painful. Add WithBlock can prevent the edge case. And
n common case, the containerd will be serving in shortly.
It is not harm to add WithBlock for containerd connection.

Signed-off-by: Wei Fu <[email protected]>
(cherry picked from commit 9f73396)
Signed-off-by: Wei Fu <[email protected]>
@fuweid fuweid changed the title daemon: add grpc.WithBlock option [release/19.03 backport] daemon: add grpc.WithBlock option Feb 22, 2020
@fuweid
Copy link
Contributor Author

fuweid commented Feb 22, 2020

ping @cpuguy83

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah changed the title [release/19.03 backport] daemon: add grpc.WithBlock option [19.03 backport] daemon: add grpc.WithBlock option Feb 22, 2020
Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 merged commit 6791156 into moby:19.03 Feb 22, 2020
@fuweid fuweid deleted the cp1903-40137 branch February 22, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants