This repository was archived by the owner on May 12, 2021. It is now read-only.
[cherry-pick 1.7]: katautils: fix shim v2 fail to work with libnetwork#1795
Merged
egernst merged 1 commit intokata-containers:stable-1.7from Jun 14, 2019
Ace-Tang:stable-1.7-fix-v2
Merged
[cherry-pick 1.7]: katautils: fix shim v2 fail to work with libnetwork#1795egernst merged 1 commit intokata-containers:stable-1.7from Ace-Tang:stable-1.7-fix-v2
egernst merged 1 commit intokata-containers:stable-1.7from
Ace-Tang:stable-1.7-fix-v2
Conversation
detail how kata work with libnetwork 1. kata create a new netns 2. with EnterNS, kata change netns to the created one. 3. in pre-start hook, kata will re-exec libnetwork process libnetwork-setkey, and send self pid to it. libnetwork use /proc/pid/ns/net to find the netns kata use, and set veth into the netns. v1/v2 shim use the same way to create network, v1 can successful because EnterNS changed both current thread and main thread's netns. But use v2 shim, only changed current thread netns, main thread still use host netns, so it fails. Looks like v1 just lucky to be successful. In kata, `state.Pid` should be tid. Fixes: #1788 Signed-off-by: Ace-Tang <aceapril@126.com>
Member
|
/test |
lifupan
approved these changes
Jun 13, 2019
Contributor
Author
Is it caused by network ? |
Codecov Report
@@ Coverage Diff @@
## stable-1.7 #1795 +/- ##
===========================================
Coverage 53.92% 53.92%
===========================================
Files 106 106
Lines 13142 13142
===========================================
Hits 7087 7087
Misses 5206 5206
Partials 849 849 |
Contributor
|
@jodh-intel - query on doc url checker and a badge I think? |
|
@Ace-Tang - yes, it's a transitory network issue. |
jodh-intel
approved these changes
Jun 13, 2019
|
/retest |
amshinde
approved these changes
Jun 13, 2019
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
detail how kata work with libnetwork
libnetwork-setkey, and send self pid to it. libnetwork use
/proc/pid/ns/net to find the netns kata use, and set veth into the netns.
v1/v2 shim use the same way to create network, v1 can successful
because EnterNS changed both current thread and main thread's netns.
But use v2 shim, only changed current thread netns, main thread still
use host netns, so it fails. Looks like v1 just lucky to be successful.
In kata,
state.Pidshould be tid.Fixes: #1788
Signed-off-by: Ace-Tang aceapril@126.com