-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
in_tail: add warning for silent stop on !follow_inodes case #4339
in_tail: add warning for silent stop on !follow_inodes case #4339
Conversation
If reverting #4327 and reproducing #3614, Fluentd outputs the following logs.
conf <system>
log_level debug
</system>
<source>
@type tail
tag test
path /test/fluentd/input4/test.log
pos_file /test/fluentd/pos/pos
read_from_head true
refresh_interval 10
<parse>
@type none
</parse>
</source>
<match test.**>
@type stdout
</match> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it, it seems reasonable.
For `refresh_watcher`, if an exisiting TailWatcher already follows a target path with the different inode, it means that the TailWatcher following the rotated file still exists. In this case, `refresh_watcher` can't start the new TailWatcher for the new current file. So, we should output a warning log in order to prevent silent collection stops, such as fluent#4327. The similar warning may work for follow_inodes too. Just limiting the case to suppress the impact to existing logic. Signed-off-by: Daijiro Fukuda <[email protected]>
b622010
to
d49cfba
Compare
The fixed message example (old: #4339 (comment))
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
) For `refresh_watcher`, if an exisiting TailWatcher already follows a target path with the different inode, it means that the TailWatcher following the rotated file still exists. In this case, `refresh_watcher` can't start the new TailWatcher for the new current file. So, we should output a warning log in order to prevent silent collection stops, such as fluent#4327. The similar warning may work for follow_inodes too. Just limiting the case to suppress the impact to existing logic. Signed-off-by: Daijiro Fukuda <[email protected]>
Which issue(s) this PR fixes:
This PR just adds a warning log for the following issue's !follow_inodes case.
I believe this problem has been resolved with the next PR.
This PR adds a warning log just in case in order to prevent silent collection stops like that.
What this PR does / why we need it:
For
refresh_watcher
, if an exisiting TailWatcher already follows a target path with a different inode, it means that the TailWatcher following the rotated file still exists.In this case,
refresh_watcher
can't start the new TailWatcher for the new current file.So, we should output a warning log in order to prevent silent collection stops, such as #4327.
The warning log example:
A similar warning may work for follow_inodes too. Just limiting the case to suppress the impact to existing logic.
Docs Changes:
Not needed. (This adds a warning log only.)
Release Note:
Same as the title.