Open verejoel opened 9 months ago
Here is a link to a screen recording showing the effect on a neighbouring container's logs, as a screenshot doesn't really do it justice.
Thanks for the detailed report @verejoel Can you please include your promtail & Loki configs? (remember to redact sensitive information)
@dannykopping done, thanks for taking a look. I can provide the exact log files if needed (although I don't think the actual content should matter in this case)
Describe the bug Very long (~1.5 MiB) log lines produced by one container somehow end up concatenated to log lines in other container's log streams.
To Reproduce This is not trivial to reproduce. We see this running the ArgoCD Applicationset Controller, which periodically produces a log line of the form
Here the
allPaths
attribute is a slice of strings enumerating all the applications in the application set. In our case, this leads to a log line that is over 1.5 MB in size.We then notice that this log line appears concatenated with logs from other containers. The log is indexed exactly as if it had been emitted by the other container, but is prefixed by the super log line, with the desired log line concatenated to the end of the block.
Furthermore, it seems that the rogue log line is chunked into multiple lines, all 16384 bytes in length. So what we get, schematically, is the following:
We have attempted to use pipeline stages to drop logs from this namespace, but it seems the logs are already corrupted by the time they get indexed by promtail. Therefore it seems like it could be a bug in the file watcher component. Only logs sharing a node with the noisy neighbour are affected.
Expected behavior The rogue log line should not appear in logs from other containers.
Environment:
Screenshots, Promtail config, or terminal output The affected indexes are restricted to the same node, which is where the container producing the large log outputs is running. This leads us to believe that this is a bug in Promtail file watcher component.
The log files for this container are rotated fairly rapidly by Kubernetes. The promtail logs contain many updates of this sort as the logs get continuously rotated:
Promtail Config
Loki config