-
Notifications
You must be signed in to change notification settings - Fork 950
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: fix containerd pid may be reuse #2679
Merged
rudyfly
merged 1 commit into
AliyunContainerService:master
from
HusterWan:zr/fix-ctrd-pid-duplicate
Jan 28, 2019
Merged
bugfix: fix containerd pid may be reuse #2679
rudyfly
merged 1 commit into
AliyunContainerService:master
from
HusterWan:zr/fix-ctrd-pid-duplicate
Jan 28, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #2679 +/- ##
==========================================
- Coverage 69.19% 69.13% -0.07%
==========================================
Files 278 278
Lines 17392 17415 +23
==========================================
+ Hits 12035 12040 +5
- Misses 4028 4048 +20
+ Partials 1329 1327 -2
|
HusterWan
force-pushed
the
zr/fix-ctrd-pid-duplicate
branch
from
January 21, 2019 14:55
c0ec91a
to
a2d11d6
Compare
HusterWan
force-pushed
the
zr/fix-ctrd-pid-duplicate
branch
from
January 22, 2019 02:13
a2d11d6
to
772275c
Compare
Ace-Tang
reviewed
Jan 23, 2019
Ace-Tang
reviewed
Jan 23, 2019
HusterWan
force-pushed
the
zr/fix-ctrd-pid-duplicate
branch
2 times, most recently
from
January 23, 2019 11:37
f24d5c8
to
463c541
Compare
Signed-off-by: Michael Wan <zirenwan@gmail.com>
HusterWan
force-pushed
the
zr/fix-ctrd-pid-duplicate
branch
from
January 24, 2019 09:46
463c541
to
cfa6f64
Compare
pouchrobot
added
the
LGTM
one maintainer or community participant agrees to merge the pull reuqest.
label
Jan 24, 2019
LGTM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Michael Wan zirenwan@gmail.com
Ⅰ. Describe what this PR did
In case containerd process may still alive on the host when the pouchd starting, we cache the containerd pid in a file
container.pid
and the pid file will be deleted when the pouchd exited.In this case, we can check if the pid of containerd still alive, if true pouchd will not run a new containerd instance, but just take over the old containerd instance.
But there has a situation that the pid file cannot be deleted that the host was broken down by accident, and when the host restart again the pid file record a pid reused by the other process but the containerd. So when the pouchd restarting, it will check the containerd is alived but cannot take over the process because the process is not the containerd.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
add PouchDaemonSuite.TestContainerdPIDReuse
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews