You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
recently I noticed an issue, related to symlink_path mechanism in td-agent/fluentd receiver agent. It seems like td-agent successfully receives two (or more) log streams from k8s cluster and creates two (or more) buffers for them, but it always create only one symlink in provided directory.
From agent's logs we can read, that td-agent recognized and created two buffers for two log streams:
2023-10-02 15:00:04 +0200 [debug]: #0 Created new chunk chunk_id="606bb5a4e90896a0fcff5b8d2d5c1b83" metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1696251600, tag="k8s.cilium-sxjgc.stdout.log", variabl
es={:"$.kubernetes.namespace_name"=>"kube-system", :"$.kubernetes.pod_name"=>"cilium-sxjgc", :stream_group=>"stdout", :"$.kubernetes.container_name"=>"fwlogs-prod"}, seq=0>
2023-10-02 15:00:04 +0200 [debug]: #0 Created new chunk chunk_id="606bb5a4e95bcad718a493023a4caa68" metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1696251600, tag="k8s.cilium-sxjgc.stdout.log", variabl
es={:"$.kubernetes.namespace_name"=>"kube-system", :"$.kubernetes.pod_name"=>"cilium-sxjgc", :stream_group=>"stdout", :"$.kubernetes.container_name"=>"fwlogs-tech"}, seq=0>
And when I checked buffers' directory, both of them was present and was continuously written:
The second buffer exists, but symlink wasn't created. I didn't find anything interesting in td-agent logs. It just skips creating symlink for the other buffer for some reason.
In the meantime I recreated my k8s pods many times and td-agent always creates only one symlink. It's definitely not related to my system or permissions. Seems like td-agent internal logic issue...
To Reproduce
To reproduce this issue, use td-agent.conf provided below.
Well, seems like buffers always use tag as an unique ID. In my example, both log streams had same tag (but other variables, which should be included and separated by the buffers). Anyway, I removed 'tag' from section and now it works properly. But what's the point of defining custom variables for the buffer, if it still uses 'tag' as a determinant of uniqueness?
Thank you for your report!
I think that the symlink path should be unique for each buffer.
So you will get the expected result by changing the symlink path tag from tag{0} to tag.
Describe the bug
Hey there,
recently I noticed an issue, related to symlink_path mechanism in td-agent/fluentd receiver agent. It seems like td-agent successfully receives two (or more) log streams from k8s cluster and creates two (or more) buffers for them, but it always create only one symlink in provided directory.
From agent's logs we can read, that td-agent recognized and created two buffers for two log streams:
And when I checked buffers' directory, both of them was present and was continuously written:
So far so good. But I configured td-agent to create symlinks for me. And it also works, but only for one buffer:
The second buffer exists, but symlink wasn't created. I didn't find anything interesting in td-agent logs. It just skips creating symlink for the other buffer for some reason.
In the meantime I recreated my k8s pods many times and td-agent always creates only one symlink. It's definitely not related to my system or permissions. Seems like td-agent internal logic issue...
To Reproduce
To reproduce this issue, use td-agent.conf provided below.
Expected behavior
Symlinks should be created for every open buffer.
Your Environment
Your Configuration
Your Error Log
There isn't any error in the logs.
Additional context
No response
The text was updated successfully, but these errors were encountered: