Conversation
Marinski
force-pushed
the
fix/log-rotation
branch
from
October 2, 2026 08:54
21b0b66 to
59143fb
Compare
Each VM mounts its own host directory over /shared/logs (vms.yaml carries log_dir per VM), so the stack has one log directory per VM. The rotator mounted /data/mt5-shared/logs and nothing else -- only the fast VM's -- so the bulk VM's logs were never rotated at all (found 2026-08-21: full.log at 193 MB, no archive since July). Mounts and LOG_DIRS now come from vms.yaml, deduplicated by log_dir; a topology naming none falls back to the shared directory, and the singular LOG_DIR is still accepted. A directory named but not mounted is logged and skipped rather than aborting the pass. Archives are gzipped. Truncating the host log to 0 does not reset the Windows guest's cached write offset, so the live file comes back as a hole; busybox cp does not preserve holes and wrote every zero into the archive -- 2.18 GB from 13 MB of real text in a single pass, growing daily. gzip turns that run of zeros back into nothing and needs nothing added to the alpine image. Archives written before this are compressed in place on the next pass, and retention reads the date with any .gz stripped first so a compressed archive still ages out.
Marinski
force-pushed
the
fix/log-rotation
branch
from
October 2, 2026 09:01
59143fb to
b3fd8f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #24.
LOG_DIRS(generated from each VM'slog_dirinvms.yaml) instead of one hardcoded path; a directory named but not mounted is logged and skipped rather than aborting the pass..gzstripped so a compressed archive still ages out.Tests:
tests/test_rotate_logs.py(multi-directory) andtests/test_config_generation.py(the generated compose emits a mount and aLOG_DIRSentry per VM).