]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl: allow running vacuum on remote journals, too
authorJan Kundrát <jan.kundrat@cesnet.cz>
Sat, 2 Nov 2019 15:42:01 +0000 (16:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 4 Nov 2019 13:52:27 +0000 (14:52 +0100)
Right now the `systemd-journal-remote` service does not constrain its
resource usage (I just run out of space on my 100GB partition, for
example). This patch does not change that, but it at least makes it
possible to run something like:

  journalctl --directory /var/log/journal/remote --rotate --vacuum-size=90G

fixes #2376

Co-authored-by: Mike Auty <ikelos@gentoo.org>
src/journal/journalctl.c

index 771c5c1730e5ab2399bba23bbe22eb37faff11a6..e5a2f6efcf47bcb9e64c2c39d355384e4fba150e 100644 (file)
@@ -2240,9 +2240,6 @@ int main(int argc, char *argv[]) {
                 HASHMAP_FOREACH(d, j->directories_by_path, i) {
                         int q;
 
-                        if (d->is_root)
-                                continue;
-
                         q = journal_directory_vacuum(d->path, arg_vacuum_size, arg_vacuum_n_files, arg_vacuum_time, NULL, !arg_quiet);
                         if (q < 0) {
                                 log_error_errno(q, "Failed to vacuum %s: %m", d->path);