On Mon, Jan 30, 2023 at 08:59:57PM +0600, Oleg Vasilev wrote:
Presently, logs from deleted domains remain forever. Particular motivation comes from the case when libguestfs has repeatedly created transient VMs, which in turn created plenty of logs. This takes up space and lots of files troubles filesystem navigation. More motivation in [1]. Patch solving same problem in [2]. Changes in v3: codestyle cleanup, minor fixes Changes in v2: substantial rework according to Martin Kletzander's comments v1: https://www.mail-archive.com/libvir-list@xxxxxxxxxx/msg233754.html v2: https://www.spinics.net/linux/fedora/libvir/msg236081.html [1]: https://listman.redhat.com/archives/libvir-list/2022-February/228149.html [2]: https://listman.redhat.com/archives/libvir-list/2022-February/msg00865.html CC: Martin Kletzander <mkletzan@xxxxxxxxxx> Oleg Vasilev (5): logging: refactor to store config inside log handler logging: move virLogHandler to header logging: add configuration for future log cleaner logging: add log cleanup for obsolete domains logging: use the log cleaner
Reviewed-by: Martin Kletzander <mkletzan@xxxxxxxxxx> and I will push it once the pipeline finishes because I found a few more issues in there on top of fixes mentioned in 4/5: https://gitlab.com/nertpinx/libvirt/-/pipelines/766719872
po/POTFILES | 1 + src/logging/log_cleaner.c | 268 +++++++++++++++++++++++++++++++ src/logging/log_cleaner.h | 29 ++++ src/logging/log_daemon.c | 6 +- src/logging/log_daemon_config.c | 9 ++ src/logging/log_daemon_config.h | 3 + src/logging/log_handler.c | 64 +++----- src/logging/log_handler.h | 50 ++++-- src/logging/meson.build | 1 + src/logging/test_virtlogd.aug.in | 2 + src/logging/virtlogd.aug | 2 + src/logging/virtlogd.conf | 14 ++ 12 files changed, 391 insertions(+), 58 deletions(-) create mode 100644 src/logging/log_cleaner.c create mode 100644 src/logging/log_cleaner.h -- 2.39.1
Attachment:
signature.asc
Description: PGP signature