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

Add clarity into container/image garbage collection in kubelet #15564

Closed
yujuhong opened this issue Oct 13, 2015 · 10 comments
Closed

Add clarity into container/image garbage collection in kubelet #15564

yujuhong opened this issue Oct 13, 2015 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@yujuhong
Copy link
Contributor

We've received plenty of user questions asking whether their container or image GC routine functions correctly. There are two most likely causes:

  1. Their GC settings are not aggressive enough. I usually point them to our GC doc to check if varying the parameters would help (thanks to @dalanlan, @pwittrock and @vishh for the doc).
  2. GC does not run correctly. This is harder to detect.

To provide more clarity for the second case, we can do:

  1. Log more. This is the easiest solution, but reading kubelet.log may not be the best experience (for users) as it could be noisy. We also don't want to add more to our logs.
  2. Similar to sync loop health check, we can ask each GC component to log a timestamp and fail the check if they are not responsive or haven't been able to successfully run recently.
  3. Registers stats to Prometheus. We can ask the users to check the /metrics endpoint. We can also add a Prometheus pod to scrape the data in the future (Prometheus auto discovery #11858).

I am leaning towards option (3) since it's easier to customize the metrics we collect, and it's more user-friendly too.
Thoughts? @kubernetes/goog-node

@yujuhong yujuhong added priority/backlog Higher priority than priority/awaiting-more-evidence. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Oct 13, 2015
@yujuhong
Copy link
Contributor Author

See #15115 for an example where the more clarity would have helped.

@vishh
Copy link
Contributor

vishh commented Oct 13, 2015

GC does not run correctly. This is harder to detect.

What are the possible scenarios under which GC fails? If this is a binary state, one option is to generate an event and mark the node not schedulable.

Metrics are useful for performance analysis. They are that helpful when it comes to cluster stability.

@yujuhong
Copy link
Contributor Author

What are the possible scenarios under which GC fails? If this is a binary state, one option is to generate an event and mark the node not schedulable.

I agree that in general metrics should be used for performance analysis, but it could be useful in cases where the failure is not fatal or cannot be solved by restarting kubelet.

GC could fail sporadically if docker misbehaves, couldn't it? We don't kill kubelet if a single docker request fails or takes too long. E.g., there are bugs where docker is slow in removing images, e.g., moby/moby#16771, and restarts kubelet doesn't help at all.

@fejta-bot
Copy link

Issues go stale after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Freeze the issue for 90d with /lifecycle frozen.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/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 Dec 14, 2017
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 13, 2018
@yujuhong yujuhong removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 16, 2018
@yujuhong
Copy link
Contributor Author

I think this is still relevant, but would like input from @dashpole

@dashpole
Copy link
Contributor

My impression is that #57006 is the primary issue driving user confusion. I am not aware of any major bugs with it, but the events can be misleading, since they "fail", even when the system is WAI. I believe #58229, and #57020 will solve this.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Apr 16, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 16, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

5 participants