Skip to content

AUT-686 - excluding gpg2 cache files from tmpreaper - #1279

Merged
alexcottner merged 1 commit into
mainfrom
aut-686-gpg2
Nov 6, 2026
Merged

alexcottner merged 1 commit into
mainfrom
aut-686-gpg2

Conversation

@alexcottner

@alexcottner alexcottner commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

AUT-686
After running tmpreaper to stage for a bit, realized that the gpg2 signers write some cache files to tmp that they need to reference later.
Adding an exclusion pattern to tmpreaper to prevent deleting these files.
Created a follow-up issue to refactor this code so these are written to a more resilient location.

@alexcottner
alexcottner requested review from a team as code owners November 6, 2026 15:28
Comment thread tmpreaper.go
func (r *tmpreaper) cleanTmp() {
// Remove temp files that have not been accessed in the last 15 minutes
cmd := exec.Command("tmpreaper", "-a", "--showdeleted", "15m", os.TempDir())
cmd := exec.Command("tmpreaper", "--protect", "'/tmp/autograph_gpg2_*'", "--showdeleted", "15m", os.TempDir())

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-a is unnecessary, but need to ignore gpg2 signers as they currently store required data in temp files

@say-yawn say-yawn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gpg2 keyrings which are currently stored in /tmp will be moved to a more permanent location in a follow-up. The gpg2 files are small enough (max multiple 4KB) and we currently have a static SSD 50GB resource where the /tmp is stored.

@alexcottner
alexcottner merged commit cae3efe into main Nov 6, 2026
15 checks passed
@alexcottner
alexcottner deleted the aut-686-gpg2 branch November 6, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants