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

More places WaitForCacheSync() return value is ignored #1936

Open
ahmetb opened this issue Nov 2, 2024 · 1 comment
Open

More places WaitForCacheSync() return value is ignored #1936

ahmetb opened this issue Nov 2, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@ahmetb
Copy link
Member

ahmetb commented Nov 2, 2024

As reported in #1817, ignoring WaitForCacheSync() is resulting in disastrous outcomes like all node labels being removed. Failing to populate an informer cache successfully and starting the controller causes the controller to operate on incomplete desired state, and potentially causes it to perform destructive actions.

It seems despite the recent reports and fixes in here and here we've recently accepted new code that doesn't pay attention to return value from WaitForCacheSync():

https://github.com/kubernetes-sigs/node-feature-discovery/blame/1c6ce897f2b9922cec70c2c983e852a831021ef6/pkg/nfd-master/namespace-lister.go#L35-L41

I might recommend rewriting the entire controller in something like controller-runtime which has better guardrails against these sort of common pitfalls in using the informer machinery directly.

/cc @marquiz
/cc @ArangoGutierrez

@ahmetb ahmetb added the kind/bug Categorizes issue or PR as related to a bug. label Nov 2, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

3 participants