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

waitUntilReady leaves watches/websocket open upon timeout #3598

Closed
rnorth opened this issue Nov 16, 2021 · 4 comments · Fixed by #3599
Closed

waitUntilReady leaves watches/websocket open upon timeout #3598

rnorth opened this issue Nov 16, 2021 · 4 comments · Fixed by #3599
Assignees
Labels
Milestone

Comments

@rnorth
Copy link

rnorth commented Nov 16, 2021

It appears that waitUntilReady for a Pod will leave a Watch, and therefore websocket connection, open if the Pod fails to become ready in time. This can lead to a buildup of open websocket connections to the k8s API, and eventually resource exhaustion.

We've not dug into every nuance, but in our usage we are deleting the pod after the timeout occurs. The watch seems to remain open despite both the timeout and the deletion.

One workaround seems to be to use a custom Watcher, and manually ensure that the ensuing Watch is closed when a failure occurs.

@shawkins
Copy link
Contributor

What version of fabric8 is this on?

@rnorth
Copy link
Author

rnorth commented Nov 16, 2021

We've observed this with 5.9.0 and 5.7.2.

@shawkins
Copy link
Contributor

Under the covers the logic should terminate the informer / watch when the future completes -

However I do see that the cancel is being applied to the wrong future. I've opened a pr for this.

@rnorth
Copy link
Author

rnorth commented Nov 17, 2021

Aha, great, thank you @shawkins

@shawkins shawkins self-assigned this Nov 17, 2021
@manusa manusa added this to the 5.11.0 milestone Nov 22, 2021
@manusa manusa added the bug label Nov 22, 2021
manusa pushed a commit to shawkins/kubernetes-client that referenced this issue Nov 22, 2021
manusa pushed a commit to shawkins/kubernetes-client that referenced this issue Nov 23, 2021
manusa pushed a commit to shawkins/kubernetes-client that referenced this issue Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants