-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
terraform creates sockets named /tmp/tf-plugin12345678 and never deletes them #3166
Comments
On mac you'll find these files in I can confirm I have tons of these files. |
Those are temporary files created when loading the plugins: We're just using Go's built in
Those files are per-user temporary files and caches; I've found a fairly detailed writeup about them here: This is the result of Terraform using temporary file space for scratch. I have 1,200 some files in there (only ~700 are Do you have any of these files that have not been modified in the past 3 days? |
So long as those files don't contain credentials or sensitive information, I'm comfortable trusting the operating system's cleanup. |
It will only be cleaned up on reboot, just so you know... |
Surely this isn't acceptable? I now have 64840 directories after a few weeks - I cringe to think of how bad this will be after a few years of uptime.
Which will hopefully never happen .. at least if you value high uptime. Update: a colleague of mine just mentioned that the filesystem inodes are depleted for our tmp volumes within 12 days due to this. |
@wleese: are you seeing files older than 3 days? Cleanup occurs more frequently than mere restarts on systems. Have you confirmed that the fs does runs out of inodes in practice? On what platform is this occurring? |
RHEL6, indeed just 3 days old. Regardless of if we run out in the end, the fact that a tool puts so much pressure on a resource that we need to worry about it indicates there's something to be fixed. This would be more forgivable is terraform had some kind of incredibly storage heavy state to manage, but yeah.. |
I'm sorry this is breaking things for you. Do you need any assistance writing a patch to fix this? |
I'd expect this to be sufficient:
Sadly it seems that anything deferred is not run - likely due to the way plugins are handled. |
Will this ticket be re-opened by the way? |
We're seeing this in our CI environment. Hundreds of |
Same. This is a problem, and I suspect it might cause some issues with the kernel limits if there's a lot of terraform instances being run very fast. You can't rely on reboots here. |
…anse Refactor SSH CA backend docs
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
No description provided.
The text was updated successfully, but these errors were encountered: