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
I have two log files in different block device. Two log files have same file name and same inode number.
The first file with inode 17 in device fh72h/64882d
stat /var/lib/kubelet/pods/pod-uid-1/volumes/kubernetes.io~csi/local-pv-id-1/mount/xx/xx/file.log
Device: fh72h/64882d Inode:17
The second file with inode 17 in device fd53h/64851d
stat /var/lib/kubelet/pods/pod-uid-2/volumes/kubernetes.io~csi/local-pv-id-2/mount/xx/xx/file.log
Device: fd53h/64851d Inode:17
When I want collect the two file.log, I find fluentd only collect one file, the other one doesn't show the fluentd tail target and existing list.
In addition, I use config follow_inodes false, enable_stat_watcher true, enable_watch_timer true, open_on_every_update true , still have some problem.
When I mount new volume to /var/lib/kubelet/pods/pod-new/volumes/kubernetes.io~csi/local-pv-new/mount ,
and config tail path is /var/lib/kubelet/pods/*/volumes/kubernetes.io~csi/*/mount/namespace/*/*/*.log
Fluentd can't collect new log in /var/lib/kubelet/pods/pod-new/volumes/kubernetes.io~csi/local-pv-new/mount/namespace/*/*/file.log.
After I restart Fluentd agent, then the log can be collected to Fluentd.
So how can I collect the log file that stored in new mounted path without restarting Fluentd agent.
**Update**
There is no problem with config follow_inodes false, enable_stat_watcher true, enable_watch_timer true, open_on_every_update true.
The reason caused log file missing is because K8S pod get the node mountpoint need config mountPropagation: HostToContainer
Thanks for your report!
Hmm, it seems a specification bug.
The ideal solution is adding device ID to pos file, but doing it is not so easy with keeping backward compatibility.
Possible work around is separating <source> section per devices, although it might be hard to use in this case since mount point is determined dynamically.
Describe the bug
I have two log files in different block device. Two log files have same file name and same inode number.
When I want collect the two file.log, I find fluentd only collect one file, the other one doesn't show the fluentd tail target and existing list.
To Reproduce
Expected behavior
Fluentd can identify inode number in different block device, and collect log.
Your Environment
Your Configuration
Your Error Log
There is no error log, just can't get the log. And Fluentd print existing just include one log file.
Additional context
No response
The text was updated successfully, but these errors were encountered: