Skip to content

Commit

Permalink
in_tail: Fix a regression of retrying unaccessible files
Browse files Browse the repository at this point in the history
When a fluentd proccess doesn't have permision to read a file, it should
retry to open it again. But the current implementation doesn't do it due
to a bug introduced at #3378. This pull request intend to rescue EACCESS
on stat(2) but it also rescue it on open(2) wrongly.

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
  • Loading branch information
ashie committed Jul 30, 2021
1 parent 7671d77 commit fc6dfa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ def open
rescue RangeError
io.close if io
raise WatcherSetupError, "seek error with #{@path}: file position = #{@watcher.pe.read_pos.to_s(16)}, reading bytesize = #{@fifo.bytesize.to_s(16)}"
rescue Errno::ENOENT, Errno::EACCES
rescue Errno::ENOENT
nil
end

Expand Down

0 comments on commit fc6dfa4

Please sign in to comment.