Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promtail cri stage should not insert newlines while joining partial log lines #7996

Closed
umezawatakeshi opened this issue Dec 22, 2022 · 1 comment · Fixed by #7997 or cybozu/neco-containers#924
Assignees
Labels
component/promtail type/bug Somehing is not working as expected

Comments

@umezawatakeshi
Copy link

Describe the bug
cri stage is able to join partial log lines which are splitted by cri-o and to treat them as single log entry. However, it inserts newlines '\n' while joining lines by mistake. They should become single line.

To Reproduce
Steps to reproduce the behavior:

  1. Start Loki v2.7.1
  2. Start Promtail v2.7.1 and tail Pod logs. cri stage should be enabled.
  3. Deploy a Pod which outputs single long (~20KB) log line. The line does not contain newline, of course.
  4. Query that log. Single log entry is returned but it contains newline.

Expected behavior
The returned log entry should not contain newline.

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm

Screenshots, Promtail config, or terminal output

@kavirajk kavirajk self-assigned this Dec 22, 2022
kavirajk added a commit that referenced this issue Dec 22, 2022
When re-creating single lines from multiple partial lines, `\n` should be avoided to join the partial lines.

Related: #6177 (comment)

Fixes: #7996

Signed-off-by: Kaviraj <[email protected]>
@umezawatakeshi
Copy link
Author

This issue was accidentally closed by completion of my PR in my organization...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/promtail type/bug Somehing is not working as expected
Projects
None yet
3 participants