/tmp/ directory is not correctly shared by action runners
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
This was originally reported in #3122 and supposedly solved / fixed by https://github.com/StackStorm/st2-packages/pull/458.
I just spent 1 hour+ debugging an issue which it turns out it's related to this problem - /tmp directory is not correctly shared by the runners on Ubuntu 16.04.
As the comments there say - there are still edge cases where /tmp/ sharing doesn't work correctly. I'm aware of the security benefits of having a private /tmp/ for action runners, but a lot of our workflows, etc. rely on sharing stuff via /tmp/ and now that doesn't work correctly in some scenarios.
Even if we think current approach is the right solution, I'm worried about the user experience. Even if we document it, I'm sure others will encounter this problem and waste a lot of time debugging a root cause.
My proposal is to change PrivateTmp=false or at the very least put a very big clear explicit warning in the docs to never share files via /tmp/ inside actions because users will be in for a bad time.
Also, since https://github.com/StackStorm/st2-packages/pull/458 made the change to True, it might have actually introduced the regression, at least for some versions, because PrivateTmp used to default to false.
For context and details, please see https://github.com/StackStorm/st2-packages/pull/458#issuecomment-346296391.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #3122 and st2-packages pull request #458, including the linked discussion about PrivateTmp and Ubuntu 16.04. Reproduce the action-runner /tmp sharing edge cases, then determine whether the resolution is a configuration change or an explicit documentation warning; done means the behavior and its user-facing guidance are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100