Skip to content
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

Add experimental symlink support #2478

Merged
merged 1 commit into from
Sep 8, 2016
Merged

Add experimental symlink support #2478

merged 1 commit into from
Sep 8, 2016

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Sep 7, 2016

  • Add test to verify that symlinks are disabled by default
  • Add test for symlink handling
  • Improve error handling in harvester. Return proper error messages instead of logging it. Prevents too many log messages.
  • Remove IsRegular file call as not needed anymore and leads to additional Stat calls
  • Add documentation

See #2277 and #1767

@ruflin ruflin added discuss Issue needs further discussion. review Filebeat Filebeat labels Sep 7, 2016
@ruflin ruflin mentioned this pull request Sep 7, 2016
@tsg
Copy link
Contributor

tsg commented Sep 7, 2016

LGTM, great that you got this in before beta1. Should have a changelog item.

This implementation of symlinks takes a symlink and opens the original file. The only difference is that as Source the symlink path is reported. The advantage of this implementation is that everything related to file handling is identical with non symlink files as the original file is harvested. All close_* options work as expected. State information is stored for the original file, not the symlink itself. In case a symlink and original file are harvested, only one will be harvested as they share the same inode information.

* Add test to verify that symlinks are disabled by default
* Add test for symlink handling
* Improve error handling in harvester. Return proper error messages instead of logging it. Prevents too many log messages.
* Remove IsRegular file call as not needed anymore and leads to additional Stat calls
* Add documentation

See elastic#2277 and elastic#1767
@ruflin ruflin mentioned this pull request Sep 8, 2016
2 tasks
@tsg tsg added the needs_backport PR is waiting to be backported to other branches. label Sep 8, 2016
@tsg tsg merged commit c9260bf into elastic:master Sep 8, 2016
ruflin added a commit to ruflin/beats that referenced this pull request Sep 9, 2016
This bug was introduce with elastic#2478 . The check for the second Stat receiving was missing. In case of very fast rotating file it could be that exactly at the time of Stat request the file is not existing anymore and an error is returned. The error was not checked.
andrewkroh pushed a commit that referenced this pull request Sep 9, 2016
This bug was introduce with #2478 . The check for the second Stat receiving was missing. In case of very fast rotating file it could be that exactly at the time of Stat request the file is not existing anymore and an error is returned. The error was not checked.
@tsg tsg removed the needs_backport PR is waiting to be backported to other branches. label Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issue needs further discussion. Filebeat Filebeat review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants