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

bugfix: containerd instance exit may cause container exit #1407

Merged
merged 1 commit into from
May 24, 2018

Conversation

HusterWan
Copy link
Contributor

@HusterWan HusterWan commented May 24, 2018

Signed-off-by: Michael Wan zirenwan@gmail.com

Ⅰ. Describe what this PR did

fix problem: container may be killed when containerd process exit

we use a channel to listen container's task status, when channel return, we think the container is quit in simple, so we will kill container and container's task.

but when we restart pouchd, it will cause all channels broken, so we wrongly judge container task exited, and will kill running container.

time="2018-05-24T11:42:49.209164971+08:00" level=info msg="the task has quit, id: 5e487dbae0b37c8d2c83328c1a5cccc449645365b58036e3b5c4795b8bd86c6c, err: rpc error: code = Internal desc = transport is closing, exitcode: 255, time: 0001-01-01 00:00:00 +0000 UTC"
time="2018-05-24T11:42:49.209504432+08:00" level=error msg="failed to delete task, container id: 5e487dbae0b37c8d2c83328c1a5cccc449645365b58036e3b5c4795b8bd86c6c: grpc: the client connection is closing: failed precondition"
time="2018-05-24T11:42:49.209601826+08:00" level=error msg="failed to delete container, container id: 5e487dbae0b37c8d2c83328c1a5cccc449645365b58036e3b5c4795b8bd86c6c: grpc: the client connection is closing: failed precondition"
time="2018-05-24T11:42:49.577074167+08:00" level=info msg="close containerio backend: jsonfile, id: 5e487dbae0b37c8d2c83328c1a5cccc449645365b58036e3b5c4795b8bd86c6c"
time="2018-05-24T11:42:49.577130322+08:00" level=debug msg="%p after pop end wait %d %d %v&{{1 0} 0xc420d29200 0xc42169e4a0 0xc42169e4e0 true} 0 1 <nil>"
time="2018-05-24T11:42:49.577178302+08:00" level=info msg="finished to subscribe io, backend: jsonfile, id: 5e487dbae0b37c8d2c83328c1a5cccc449645365b58036e3b5c4795b8bd86c6c"
time="2018-05-24T11:42:49.577145494+08:00" level=debug msg="%p after pop end wait %d %d %v&{{9 0} 0xc420d29180 0xc42169e300 0xc42169e320 true} 0 1 <nil>"
time="2018-05-24T11:42:49.577199819+08:00" level=info msg="finished to subscribe io, backend: jsonfile, id: 5e487dbae0b37c8d2c83328c1a5cccc449645365b58036e3b5c4795b8bd86c6c"
time="2018-05-24T11:42:49.577213563+08:00" level=info msg="close containerio backend: jsonfile, id: 5e487dbae0b37c8d2c83328c1a5cccc449645365b58036e3b5c4795b8bd86c6c"
time="2018-05-24T11:42:49.577295216+08:00" level=debug msg="remove endpoint(0c8079230c201c1c63ca159798885fb0ac8ebeaf78fcd3e9b81bb0e84d491468) on network(bridge_11.160.218.247)"
time="2018-05-24T11:42:49.577385785+08:00" level=debug msg="Revoking external connectivity on endpoint 5e487dba (0c8079230c201c1c63ca159798885fb0ac8ebeaf78fcd3e9b81bb0e84d491468)"

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Signed-off-by: Michael Wan <zirenwan@gmail.com>
@pouchrobot pouchrobot added kind/bug This is bug report for project size/S labels May 24, 2018
@codecov-io
Copy link

Codecov Report

Merging #1407 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1407      +/-   ##
==========================================
+ Coverage   38.57%   38.59%   +0.02%     
==========================================
  Files         248      248              
  Lines       16517    16529      +12     
==========================================
+ Hits         6372     6380       +8     
- Misses       9326     9329       +3     
- Partials      819      820       +1
Impacted Files Coverage Δ
ctrd/watch.go 78.12% <100%> (+4.54%) ⬆️
ctrd/client.go 54.93% <100%> (+0.27%) ⬆️
apis/server/utils.go 61.11% <0%> (-5.56%) ⬇️
daemon/logger/jsonfile/utils.go 70% <0%> (-1.67%) ⬇️

@fuweid
Copy link
Contributor

fuweid commented May 24, 2018

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants