Skip to content
This repository

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

vectorsigma opened this Issue · 2 comments

2 participants

Nick Thomas S Hatch

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$"

Thomas S Hatch

Good call, I will get this cleaned up



Thomas S Hatch thatch45 closed this issue from a commit
Thomas S Hatch thatch45 Fix #2012 fba1525
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.