-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Manager Shutdown/Cache Establishment low-impact race-thing #1457
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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/test-infra repository. |
If you end up stopping the manager just after you start it, you end up manifesting a weird shutdown "race" in which you're still in the middle of controller startup/cache establish.
Fortunately as of newer revisions of controller-runtime (0.7x+ AFAICT), this manifests as a "error received after stop sequence was engaged" log line, which is ok but not great (v0.6.x manifests it as a graceful shutdown timeout, which is 😞 ).
It's not fatal, but it'd be nice if there were a way to avoid this, since it tends to show up a bit in certain test scenarios (e.g. manager start in beforeach, some tests that don't actually gate on controller actions).
AFAICT, you can't just wait for cache establishment, cause you'll race with actually having the controllers register themselves.
We could perhaps avoid this with a concept of runnable readiness, and a corresponding way to get the overall manager readiness. Then, you can wait in your test code for readiness to finish (nice side effect: we get a readyz endpoint "for free").
Reproducer: https://gist.github.com/DirectXMan12/6edc4c1d917b121339e2a4324432d9e7
The text was updated successfully, but these errors were encountered: