Repository navigation
fix(create_stemcell): honor TMPDIR for heavy stemcell extraction - #384
Conversation
os.MkdirTemp hardcoded "/tmp" as the parent for the unpacked-image directory, ignoring the configured TMPDIR. On systems where /tmp has insufficient space this fails heavy stemcell creation. Passing "" lets os.TempDir() resolve TMPDIR, falling back to /tmp when it is unset so existing deployments are unaffected. Part 2 of #374.
|
No actionable comments were generated in the recent review. WalkthroughThe heavy-stemcell path now creates the unpacked-image temporary directory in the system default temporary directory. Tests check the directory name and verify that a custom Suggested reviewers: Merge Risk:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the change to honor TMPDIR during heavy stemcell extraction.
No open issues 🎉
What changed in this PR
Updates heavy stemcell extraction to honor TMPDIR, allowing deployments to use a filesystem with sufficient space while preserving the /tmp fallback when unset.
Changes:
- Uses the default temporary directory instead of hardcoding
/tmp. - Adds a regression test for
TMPDIRand removes the hardcoded parent path from the existing assertion.
| File | Description |
|---|---|
src/openstack_cpi_golang/cpi/methods/create_stemcell.go |
Lets os.MkdirTemp select the configured temporary directory. |
src/openstack_cpi_golang/cpi/methods/create_stemcell_test.go |
Verifies TMPDIR is honored and updates the temporary-path assertion. |
Review effort: Balanced
os.MkdirTemp hardcoded "/tmp" as the parent for the unpacked-image directory, ignoring the configured TMPDIR. On systems where /tmp has insufficient space this fails heavy stemcell creation. Passing "" lets os.TempDir() resolve TMPDIR, falling back to /tmp when it is unset so existing deployments are unaffected.
Part 2 of #374.