Skip to content

Salt minion leaves behind temporary files in *.d directories when controlled file is immutable #2012

Closed
vectorsigma opened this Issue Sep 11, 2012 · 2 comments

2 participants

@vectorsigma

Recently, we put some files in /etc/cron.d under salt control. During a time where we had to make some non-permanent local modifications to that file, we marked it immutable using chattr.

However, when the salt minion ran, it copied the controlled file down locally to a temp file name similar to the controlled file, was unable to overwrite it, and left the temp file there.

Well, for some files, that's fine.. for any *.d/ substructure, that creates a massive problem, as the temp files tend to get included.

IMO, in the case of immutable files, once the diff has been output to screen, temp files should be wiped out to avoid this problem at least if the containing folder has the regex "^.+.d$"

@thatch45
Salt Stack member

Good call, I will get this cleaned up

@vectorsigma

Thanks!

@thatch45 thatch45 added a commit that closed this issue Sep 11, 2012
@thatch45 thatch45 Fix #2012 fba1525
@thatch45 thatch45 closed this in fba1525 Sep 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.