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

koordlet: fix nri reconnect params #2067

Conversation

saintube
Copy link
Member

Ⅰ. Describe what this PR does

  • Fix the koordlet NRI plugin parameters which may leak during the reconnections.
  • Fix a flaky test TestNriServer_Start in the koordlet NRI module.
  • Add arguments for the koordlet NRI plugin.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

Signed-off-by: saintube <saintube@foxmail.com>
@ZiMengSheng
Copy link
Contributor

/lgtm

@zwzhang0107
Copy link
Contributor

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zwzhang0107

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

codecov bot commented May 27, 2024

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 68.63%. Comparing base (1a66b95) to head (b5f788e).

Files Patch % Lines
pkg/koordlet/runtimehooks/nri/server.go 66.66% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2067      +/-   ##
==========================================
- Coverage   68.63%   68.63%   -0.01%     
==========================================
  Files         430      430              
  Lines       39518    39534      +16     
==========================================
+ Hits        27125    27133       +8     
- Misses      10049    10059      +10     
+ Partials     2344     2342       -2     
Flag Coverage Δ
unittests 68.63% <76.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@koordinator-bot koordinator-bot bot merged commit f436876 into koordinator-sh:main May 27, 2024
21 checks passed
@@ -248,13 +261,17 @@ func (p *NriServer) RemovePodSandbox(pod *api.PodSandbox) error {
func (p *NriServer) onClose() {
//TODO: consider the pod status during restart
retryFunc := func() (bool, error) {
stub, err := stub.New(p, append(opts, stub.WithOnClose(p.onClose))...)
if p.stopped.Load() { // if set to stopped, no longer reconnect
Copy link
Member

Choose a reason for hiding this comment

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

So, currently, nri server never stop, right ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Currently, this method is used by the testing.

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.

None yet

4 participants