From 4384fd98fc08bef93ac9db5ea649a99f2831aaaa Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Sun, 1 May 2022 12:39:38 -0700 Subject: [PATCH] tmpfiles: add tmpfiles.d config to purge old dumps 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. --- etc/Makefile.am | 5 +++++ etc/flux.conf | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 etc/flux.conf diff --git a/etc/Makefile.am b/etc/Makefile.am index d35ba1a4c796..c63e446c7584 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -2,6 +2,10 @@ systemdsystemunit_DATA = flux.service #endif +tmpfilesdir = $(prefix)/lib/tmpfiles.d + +tmpfiles_DATA = flux.conf + dist_fluxrc_SCRIPTS = \ rc1 \ rc3 @@ -43,6 +47,7 @@ noinst_SCRIPTS = \ EXTRA_DIST = \ gen-cmdhelp.py \ + flux.conf \ $(noinst_SCRIPTS) completions/flux: $(srcdir)/completions/flux.pre diff --git a/etc/flux.conf b/etc/flux.conf new file mode 100644 index 000000000000..d6feb54bbbfe --- /dev/null +++ b/etc/flux.conf @@ -0,0 +1,4 @@ +# See tmpfiles.d(5) +# remove Flux dump files older than 30 days + +e /var/lib/flux/dump - - - 30d