juju debug-log has line limit
This bug report will be marked for expiration in 37 days if no further activity occurs. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
We're using juju debug-log to collect logs in our CI and noticed that logs are missing if there are too many logs
Increasing `agent-
This is on a localhost lxd cloud and the logs do exist in controller/0 /var/log/
Example CI run: https:/
Attached is a zip archive that includes `juju debug-log` output and logsink.log from the example CI run
Versions:
juju agent: 3.3.3
snaps:
Name Version Rev Tracking Publisher Notes
core20 20240111 2182 latest/stable canonical** base
core22 20240111 1122 latest/stable canonical** base
juju 3.3.3 26652 3.3/stable canonical** -
lxd 5.20-f3dd836 27049 latest/stable canonical** -
snapd 2.61.2 21184 latest/stable canonical** snapd
We're currently working around this by manually parsing logsink.log and using a regex to generate an output similar to juju debug-log: https:/
Originally reported on Matrix: https:/
tags: | added: canonical-data-platform-eng |
tags: | removed: canonical-data-platform-eng |
debug-log is "best effort" and is sourced from a capped collection in mongo. This is separate to any log files written to disk with the associated max file size setting.
The config you might want to try changing is this
// ModelLogsSize is the size of the capped collections used to hold the
// logs for the models, eg "20M". Size is per model.
ModelLogsSize = "model-logs-size"
I would be wary about setting that too high though.