Daniel Belenky created OVIRT-2551:
-------------------------------------
Summary: failure to remove journal logs
Key: OVIRT-2551
URL:
https://ovirt-jira.atlassian.net/browse/OVIRT-2551
Project: oVirt - virtualization made easy
Issue Type: Bug
Reporter: Daniel Belenky
Assignee: infra
Lately, we've seen an issue where systemd-journal logs dir belongs to the root group
and automation (slave_cleanup.sh) fails to remove those logs and eventually fails the
entire job. I can think of 2 reasons why we should remove journals: saving disk space and
possibly having a clean journal for every job (though it makes debugging hard because we
don't have old logs). Anyway, I think that the way we remove journal logs is improper
- maybe back when David wrote this (back in 2015) it was the only way, but today we can
ask journalctl to handle the logs rotation for us:
--vacuum-size=, --vacuum-time=, --vacuum-files=
Removes archived journal files until the disk space they use falls below the
specified size (specified with the usual "K", "M", "G" and
"T" suffixes), or all archived journal
files contain no data older than the specified timespan (specified with the
usual "s", "m", "h", "days", "months",
"weeks" and "years" suffixes), or no more than the
specified number of separate journal files remain. Note that running
--vacuum-size= has only an indirect effect on the output shown by --disk-usage, as the
latter includes
active journal files, while the vacuuming operation only operates on archived
journal files. Similarly, --vacuum-files= might not actually reduce the number of journal
files
to below the specified number, as it will not remove active journal files.
--vacuum-size=, --vacuum-time= and --vacuum-files= may be combined in a single invocation
to
enforce any combination of a size, a time and a number of files limit on the
archived journal files. Specifying any of these three parameters as zero is equivalent to
not
enforcing the specific limit, and is thus redundant.
I think that we should use --vacuum-time and keep journal logs for 10-15 days.
--
This message was sent by Atlassian Jira
(v1001.0.0-SNAPSHOT#100094)