-
Notifications
You must be signed in to change notification settings - Fork 949
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
feature: add CRI interface of start podsandbox #2237
feature: add CRI interface of start podsandbox #2237
Conversation
ab4cd0b
to
d0a559b
Compare
Codecov Report
@@ Coverage Diff @@
## master #2237 +/- ##
==========================================
- Coverage 66.56% 66.41% -0.15%
==========================================
Files 208 208
Lines 16756 16782 +26
==========================================
- Hits 11153 11146 -7
- Misses 4276 4310 +34
+ Partials 1327 1326 -1
|
string pod_sandbox_id = 1; | ||
} | ||
|
||
message StartPodSandboxResponse {} |
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.
remove the last char
cri/v1alpha2/cri.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
netnsPath, err := c.getNetnsPath(ctx, id, config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork(), config) |
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.
modify the function's name, it will misunderstanding
40d9b29
to
4331f4a
Compare
4331f4a
to
c9101ea
Compare
c9101ea
to
c9e31fb
Compare
cri/v1alpha2/cri_wrapper.go
Outdated
@@ -56,6 +56,20 @@ func (c *CriWrapper) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox | |||
return c.CriManager.RunPodSandbox(ctx, r) | |||
} | |||
|
|||
// StartPodSandbox start a sandbox pod which was forced to stop by external factors. | |||
// Network plugin returns same IPs when input same pod names and namespaces |
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.
Hmm... the comment seems wired to me 😂
Maybe the comment like this is more natural:
StartPodSandbox restart a sandbox pod which was stopped by accident and we should reconfigure it with network plugin which will make sure it reacquire its original network configuration, like IP address.
If it make any sense, please update other docs as well :)
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.
agree
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.
Has been updated. ^_^
Signed-off-by: Starnop <[email protected]>
c9e31fb
to
962b3f2
Compare
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.
LGTM and wait for CI
LGTM as well. |
Signed-off-by: Starnop [email protected]
Ⅰ. Describe what this PR did
Support to the ability to get the same IP after restart the PodSandbox.
Scenario: It will fail to get IP after PodSandbox restarts because of the external factors such as shutdown the host.
Ⅱ. Does this pull request fix one issue?
None.
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
None.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
The work of tests rely on the tools of
CRI-tools
, in the meantime,CRI-tools
imports the project ofalibaba/pouch
. So add the interface related, and hope to be merged ASAP, I will finish the details in the nextPull Request
.