Skip to content

Commit

Permalink
tmpfiles: add tmpfiles.d config to purge old dumps
Browse files Browse the repository at this point in the history
Problem: dump files created for garbage collection may accumulate
in $statedir of a system instance.

Install a tmpfiles.d config file that removes dumps older than 30 days.
  • Loading branch information
garlick committed May 1, 2022
1 parent e4c886f commit 4384fd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions etc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
systemdsystemunit_DATA = flux.service
#endif

tmpfilesdir = $(prefix)/lib/tmpfiles.d

tmpfiles_DATA = flux.conf

dist_fluxrc_SCRIPTS = \
rc1 \
rc3
Expand Down Expand Up @@ -43,6 +47,7 @@ noinst_SCRIPTS = \

EXTRA_DIST = \
gen-cmdhelp.py \
flux.conf \
$(noinst_SCRIPTS)

completions/flux: $(srcdir)/completions/flux.pre
Expand Down
4 changes: 4 additions & 0 deletions etc/flux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# See tmpfiles.d(5)
# remove Flux dump files older than 30 days

e /var/lib/flux/dump - - - 30d

0 comments on commit 4384fd9

Please sign in to comment.