Skip to content

Fixed leftover upload dirs in sftp cache - #2629

Open
larsewi wants to merge 1 commit into
cfengine:masterfrom
larsewi:cleanup-sftp-cache-tmpdir
Open

larsewi wants to merge 1 commit into
cfengine:masterfrom
larsewi:cleanup-sftp-cache-tmpdir

Conversation

@larsewi

@larsewi larsewi commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

cache-sftp putdir uploads into tmp/cache-sftp.putdir.* on the cache server and then renames it into place. The temp dir was never removed when the rename failed (another build uploaded the package first) or when the upload aborted. These dirs piled up and filled the cache disk,.

The temp dir is now removed after the rename, and again in a separate sftp session if the upload batch failed.

Generated with Claude Code

cache-sftp putdir left tmp/cache-sftp.putdir.* behind on the server
when the rename failed (package already uploaded by another build) or
when the upload aborted. These piled up until the cache disk was full.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lars Erik Wik <[email protected]>
@larsewi

larsewi commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@craigcomstock craigcomstock 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.

one small wording change, seems reasonable

Comment thread deps-packaging/cache-sftp
"

# Remove the upload dir if the rename failed, e.g. because
# another buildslave uploaded the package first

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.

Suggested change
# another buildslave uploaded the package first
# another build host uploaded the package first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants