Tail plugin not noticing changes on remote filesystems
Bug Report
This is probably an extension of #1042 and most likely due to inotify being unable to detect changes on remote filesystems.
Describe the bug Changes to files on a remote filesystem, which are not made on the same machine as the one where fluent-bit is running on, are not read by fluent-bit, at least until fluent-bit is restarted or writes are made by the local system.
To Reproduce Have two machines A and B, A running fluent-bit.
- Mount a remote filesystem (tested with sshfs, cephfs, gpfs) on A from machine B
- use tail-plugin to follow a log on this mount
- write to log on machine B
Changes from machine A are read as expected and fluent-bit then also catches up with the written log. Just touching the file on machine A does not have the desired effect.
Expected behavior fluent-bit should tail all changes, regardless of the system it is running on.
Your Environment
- Version used: latest git, fluent-bit 1.3.0
- Operating System and version: Fedora 30, CentOS7, Funtoo 1.4, Funtoo 1.3
- Filters and plugins: tail-plugin
Additional context It seems to be related to the use of inotify instead of stat. Forcing tail_fs_stat.c to be included instead of tail_fs_inotify.c in plugins/in_tail/tail_fs.c, e.g. by invoking cmake with -DFLB_INOTIFY=Off, seems to produce the expected behaviour (tested on Fedora 30 with sshfs mount, CentOS with GPFS).
Any updates ?
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.
Whatever stale means, eff off autoclose bot
I wonder if Inotify_Watcher false helps here. This setting is per [INPUT] not global.
Thanks!
Just for completeness: The version mentioned in my initial report did not have this keyword.
Current version (1.9.3, build from git) does indeed support the Inotify_Watcher directive for the tail-Input section, and setting it to false does lead to fluent-bit picking up changes on the remote filesystem.
Possibly a short note in the corresponding section in https://docs.fluentbit.io/manual/pipeline/inputs/tail might be useful, I am not sure how well known the workings of inotify and stat are.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.
This issue was closed because it has been stalled for 5 days with no activity.