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

nfd-master: proper shutdown of nfd api informers #1848

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

marquiz
Copy link
Contributor

@marquiz marquiz commented Aug 20, 2024

Stop blocking on event channels when the api controller is stopped.
Ensures that the nfd API informer factory is properly shut down and all
resources released when stop() is called. This eliminates a memory leak
on re-configure events when leader election is enabled.

Fixes: #1841

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 20, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marquiz

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 20, 2024
Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 2bb8a72
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/66c4657ff741e1000882b531
😎 Deploy Preview https://deploy-preview-1848--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@marquiz marquiz force-pushed the devel/leader-elect branch from 50af33e to ccd13fc Compare August 20, 2024 08:46
@marquiz
Copy link
Contributor Author

marquiz commented Aug 20, 2024

/assign @ArangoGutierrez @TessaIO
/cc @subnet-dev
/cherry-pick release-0.16

@k8s-infra-cherrypick-robot

@marquiz: once the present PR merges, I will cherry-pick it on top of release-0.16 in a new PR and assign it to you.

In response to this:

/assign @ArangoGutierrez @TessaIO
/cc @subnet-dev
/cherry-pick release-0.16

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

@marquiz: GitHub didn't allow me to request PR reviews from the following users: subnet-dev.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/assign @ArangoGutierrez @TessaIO
/cc @subnet-dev
/cherry-pick release-0.16

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@marquiz
Copy link
Contributor Author

marquiz commented Aug 20, 2024

Still some investigation going on
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 20, 2024
Stop blocking on event channels when the api controller is stopped.
Ensures that the nfd API informer factory is properly shut down and all
resources released when stop() is called. This eliminates a memory leak
on re-configure events when leader election is enabled.
@marquiz marquiz force-pushed the devel/leader-elect branch from ccd13fc to 2bb8a72 Compare August 20, 2024 09:44
@marquiz
Copy link
Contributor Author

marquiz commented Aug 20, 2024

Came up with a neater solution
/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 20, 2024
@TessaIO
Copy link
Member

TessaIO commented Aug 20, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 20, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7e6222d68588302edd2c3ce0f25aec85b5907dc0

@k8s-ci-robot k8s-ci-robot merged commit 4db3216 into kubernetes-sigs:master Aug 20, 2024
10 checks passed
@marquiz marquiz mentioned this pull request Aug 20, 2024
14 tasks
@k8s-infra-cherrypick-robot

@marquiz: #1848 failed to apply on top of branch "release-0.16":

Applying: nfd-master: proper shutdown of nfd api informers
Using index info to reconstruct a base tree...
M	pkg/nfd-master/nfd-api-controller.go
M	pkg/nfd-master/nfd-master.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/nfd-master/nfd-master.go
CONFLICT (content): Merge conflict in pkg/nfd-master/nfd-master.go
Auto-merging pkg/nfd-master/nfd-api-controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 nfd-master: proper shutdown of nfd api informers
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/assign @ArangoGutierrez @TessaIO
/cc @subnet-dev
/cherry-pick release-0.16

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@marquiz marquiz deleted the devel/leader-elect branch August 20, 2024 10:04
@marquiz marquiz mentioned this pull request Dec 12, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NFD Master memory leak
5 participants