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

a lot of tmp file in snap dir as a result of etcd restart #12837

Closed
pervadepyy opened this issue Apr 7, 2021 · 2 comments · Fixed by #12846
Closed

a lot of tmp file in snap dir as a result of etcd restart #12837

pervadepyy opened this issue Apr 7, 2021 · 2 comments · Fixed by #12846
Labels
help wanted priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@pervadepyy
Copy link

Hi,
we deployed three etcd node,one of etcd node abnormal then keep restarting per 5 minutes,then a lot of tmp file in snap dir as shown in the picture.
image

we supposed this problem as a result of SaveDBFrom method not get remove tmp file when etcd restart.
image

How can this be fixed and I feel like this might cause space insufficient of etcd data disk.

@ptabor ptabor added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 7, 2021
@ptabor
Copy link
Contributor

ptabor commented Apr 8, 2021

Thank you for filling this issue. I've also spotted this problem and its mentioned here:

https://docs.google.com/document/d/1O2o1IApHWmSioXG3fez4eVlUHOrXICYGNVIzaqNS0IQ/edit?resourcekey=0-e6Iywgdkol0uiVBAaV1oww#bookmark=id.mhhwhipsg70u

I think etcd should be expanded to cleanup these files when the server is starting, so probably here:

https://github.com/etcd-io/etcd/blob/63c25bf3780b1e64adaaf636f69279fadb00e7e8/server/etcdserver/server.go#L328

A helper function in https://github.com/etcd-io/etcd/tree/master/client/pkg/fileutil might need to be added:

If anyone wants to contribute - please send a PR that deletes tmp* files my way.

@pyiyun
Copy link
Contributor

pyiyun commented Apr 9, 2021

Thanks for your attention, we send a PR that fix this issue: #12846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Development

Successfully merging a pull request may close this issue.

3 participants