-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: missing log for offset processing due to non-existent old inodes in sqlite. #8025
Comments
If there is currently no related PR, I will go ahead and submit a pull request for comparing file names in SQLite. Please comment on whether I can proceed with the pull request. |
I recall some other issues/PRs on this @jinyongchoi - did you have a quick search? However always good to have a PR so please do. |
@patrick-stephens There seems to be the expected code in the last comment of a similar issue (#4895 ), but it appears that there is no PR yet. So i will try to submit a PR. |
Hello @jinyongchoi, Thanks for reporting this behavior; I reproduced it by following your instructions. Example:
Please if the workaround is not an option for you, could you please describe a production use case where you will be deleting files monitored by Fluent-Bit and what the impact of this issue will be for your organization? Regards. |
@RicardoAAD Hi! In the case of nginx's access.log, it's common to use 'cron scripts' or 'logrotate.' The second scenario pertains to service logs. While such occurrences are infrequent, when they do happen, the logs are not handled correctly. So, to prevent these two scenarios, I plan to test and submit a pull request (PR). If it doesn't conform to FluentBit's concept, please feel free to inform me. |
…uent#8025) (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…uent#8025) (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…uent#8025) (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) (1/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) (1/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
@patrick-stephens Today, for testing purposes, the modified Fluent Bit(2.1.10) was applied to one server(1.9.8) that had been running for approximately 5 months, and the following results were obtained in log.
Thanks! |
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
…luent#8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
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 |
Ping! |
To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
…8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
Bug Report
Describe the bug
When Fluent-bit is monitoring a file that gets deleted after it has been shutdown, and if the inode exists in the SQLite file, it may result in log loss with incorrect offsets from duplicate inodes.
So accurate offset processing is required by comparing the filename of the previous inode.
To Reproduce
Expected behavior
Accurate offset processing is required by comparing the filename of the previous inode.
Screenshots
None
Your Environment
Additional context
The text was updated successfully, but these errors were encountered: