Skip to content

Create /tmp as a regular directory instead of tmpfs if outputs are in /tmp

Jeremiah Bonney requested to merge jbonney/bwrap-runner-notmpfs into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

In buildbox-run-bubblewrap if /tmp is mounted as a tmpfs volume, any outputs are removed when the bwrap sandbox is cleared. This happens before any outputs are capture. This means if an action attempts to capture anything under /tmp there will be no contents even if the action explicitly puts something there.

This PR updates buildbox-run-bubblewrap to detect this and instead create /tmp as a standard directory to allow those outputs to be captured. Since this may change the results of certain actions it's opt-in for now using the --enable-tmp-outputs flag. This flag will become the default in the new future after giving some time for potential migrations.

Changes proposed in this merge request:

  • Don't use tmpfs for /tmp if any output paths are under /tmp
  • Add --enable-tmp-outputs flag to opt-in to this behavior.
Edited by Jeremiah Bonney

Merge request reports