Hello community, here is the log from the commit of package rubygem-fluentd for openSUSE:Factory checked in at 2017-12-19 10:58:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-fluentd (Old) and /work/SRC/openSUSE:Factory/.rubygem-fluentd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-fluentd" Tue Dec 19 10:58:31 2017 rev:6 rq:558050 version:1.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-fluentd/rubygem-fluentd.changes 2017-12-06 09:01:32.794489943 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-fluentd.new/rubygem-fluentd.changes 2017-12-19 10:58:33.389150498 +0100 @@ -1,0 +2,6 @@ +Thu Dec 14 14:20:28 UTC 2017 - co...@suse.com + +- updated to version 1.0.0 + see installed CHANGELOG.md + +------------------------------------------------------------------- Old: ---- fluentd-0.14.25.gem New: ---- fluentd-1.0.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-fluentd.spec ++++++ --- /var/tmp/diff_new_pack.XVtYJ4/_old 2017-12-19 10:58:34.577093151 +0100 +++ /var/tmp/diff_new_pack.XVtYJ4/_new 2017-12-19 10:58:34.581092958 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-fluentd -Version: 0.14.25 +Version: 1.0.0 Release: 0 %define mod_name fluentd %define mod_full_name %{mod_name}-%{version} ++++++ fluentd-0.14.25.gem -> fluentd-1.0.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2017-11-30 07:09:39.000000000 +0100 +++ new/CHANGELOG.md 2017-12-06 15:05:10.000000000 +0100 @@ -1,9 +1,13 @@ # v1.0 -## Release v1.0.0.rc1/v0.14.25 - 2017/11/29 +## Release v1.0.0 - 2017/12/6 ### New features / Enhancements +* out_copy: Support ignore_error argument in `<store>` + https://github.com/fluent/fluentd/pull/1764 +* server helper: Improve resource usage of TLS transport + https://github.com/fluent/fluentd/pull/1764 * Disable tracepoint feature to omit unnecessary insts https://github.com/fluent/fluentd/pull/1764 @@ -13,9 +17,33 @@ https://github.com/fluent/fluentd/pull/1686 * plugin: Combine before_shutdown and shutdown call in one sequence. https://github.com/fluent/fluentd/pull/1763 +* Add description to parsers + https://github.com/fluent/fluentd/pull/1776 + https://github.com/fluent/fluentd/pull/1777 + https://github.com/fluent/fluentd/pull/1778 + https://github.com/fluent/fluentd/pull/1779 + https://github.com/fluent/fluentd/pull/1780 +* filter_parser: Add parameter description + https://github.com/fluent/fluentd/pull/1773 +* plugin: Combine before_shutdown and shutdown call in one sequence. + https://github.com/fluent/fluentd/pull/1763 # v0.14 +## Release v0.14.25 - 2017/11/29 + +### New features / Enhancements + +* Disable tracepoint feature to omit unnecessary insts + https://github.com/fluent/fluentd/pull/1764 + +### Bug fixes + +* out_forward: Don't update retry state when failed to get ack response. + https://github.com/fluent/fluentd/pull/1686 +* plugin: Combine before_shutdown and shutdown call in one sequence. + https://github.com/fluent/fluentd/pull/1763 + ## Release v0.14.24 - 2017/11/24 ### New features / Enhancements Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/filter_parser.rb new/lib/fluent/plugin/filter_parser.rb --- old/lib/fluent/plugin/filter_parser.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/filter_parser.rb 2017-12-06 15:05:10.000000000 +0100 @@ -26,12 +26,19 @@ helpers :parser, :record_accessor, :compat_parameters + desc 'Specify field name in the record to parse.' config_param :key_name, :string + desc 'Keep original key-value pair in parsed result.' config_param :reserve_data, :bool, default: false + desc 'Keep original event time in parsed result.' config_param :reserve_time, :bool, default: false + desc 'Store parsed values with specified key name prefix.' config_param :inject_key_prefix, :string, default: nil + desc 'If true, invalid string is replaced with safe characters and re-parse it.' config_param :replace_invalid_sequence, :bool, default: false + desc 'Store parsed values as a hash value in a field.' config_param :hash_value_field, :string, default: nil + desc 'Emit invalid record to @ERROR label' config_param :emit_invalid_record_to_error, :bool, default: true attr_reader :parser diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/multi_output.rb new/lib/fluent/plugin/multi_output.rb --- old/lib/fluent/plugin/multi_output.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/multi_output.rb 2017-12-06 15:05:10.000000000 +0100 @@ -29,6 +29,7 @@ helpers :event_emitter # to get router from agent, which will be supplied to child plugins config_section :store, param_name: :stores, multi: true, required: true do + config_argument :arg, :string, default: '' config_param :@type, :string, default: nil end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/out_copy.rb new/lib/fluent/plugin/out_copy.rb --- old/lib/fluent/plugin/out_copy.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/out_copy.rb 2017-12-06 15:05:10.000000000 +0100 @@ -25,6 +25,21 @@ desc 'If true, pass different record to each `store` plugin.' config_param :deep_copy, :bool, default: false + attr_reader :ignore_errors + + def initialize + super + @ignore_errors = [] + end + + def configure(conf) + super + + @stores.each { |store| + @ignore_errors << (store.arg == 'ignore_error') + } + end + def multi_workers_ready? true end @@ -38,8 +53,16 @@ es = m end - outputs.each do |output| - output.emit_events(tag, @deep_copy ? es.dup : es) + outputs.each_with_index do |output, i| + begin + output.emit_events(tag, @deep_copy ? es.dup : es) + rescue => e + if @ignore_errors[i] + log.error "ignore emit error", error: e + else + raise e + end + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/parser_json.rb new/lib/fluent/plugin/parser_json.rb --- old/lib/fluent/plugin/parser_json.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/parser_json.rb 2017-12-06 15:05:10.000000000 +0100 @@ -27,6 +27,7 @@ Plugin.register_parser('json', self) config_set_default :time_key, 'time' + desc 'Set JSON parser' config_param :json_parser, :enum, list: [:oj, :yajl, :json], default: :oj config_set_default :time_type, :float diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/parser_multiline.rb new/lib/fluent/plugin/parser_multiline.rb --- old/lib/fluent/plugin/parser_multiline.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/parser_multiline.rb 2017-12-06 15:05:10.000000000 +0100 @@ -22,6 +22,7 @@ class MultilineParser < Parser Plugin.register_parser('multiline', self) + desc 'Specify regexp pattern for start line of multiple lines' config_param :format_firstline, :string, default: nil FORMAT_MAX_NUM = 20 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/parser_none.rb new/lib/fluent/plugin/parser_none.rb --- old/lib/fluent/plugin/parser_none.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/parser_none.rb 2017-12-06 15:05:10.000000000 +0100 @@ -23,6 +23,7 @@ class NoneParser < Parser Plugin.register_parser('none', self) + desc 'Field name to contain logs' config_param :message_key, :string, default: 'message' def parse(text) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/parser_regexp.rb new/lib/fluent/plugin/parser_regexp.rb --- old/lib/fluent/plugin/parser_regexp.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/parser_regexp.rb 2017-12-06 15:05:10.000000000 +0100 @@ -21,8 +21,11 @@ class RegexpParser < Parser Plugin.register_parser("regexp", self) + desc 'Regular expression for matching logs' config_param :expression, :string + desc 'Ignore case in matching' config_param :ignorecase, :bool, default: false + desc 'Build regular expression as a multline mode' config_param :multiline, :bool, default: false config_set_default :time_key, 'time' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin/parser_syslog.rb new/lib/fluent/plugin/parser_syslog.rb --- old/lib/fluent/plugin/parser_syslog.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin/parser_syslog.rb 2017-12-06 15:05:10.000000000 +0100 @@ -32,8 +32,11 @@ REGEXP_DETECT_RFC5424 = /^\<.*\>[1-9]\d{0,2}/ config_set_default :time_format, "%b %d %H:%M:%S" + desc 'If the incoming logs have priority prefix, e.g. <9>, set true' config_param :with_priority, :bool, default: false + desc 'Specify protocol format' config_param :message_format, :enum, list: [:rfc3164, :rfc5424, :auto], default: :rfc3164 + desc 'Specify time format for event time for rfc5424 protocol' config_param :rfc5424_time_format, :string, default: "%Y-%m-%dT%H:%M:%S.%L%z" def initialize diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/plugin_helper/server.rb new/lib/fluent/plugin_helper/server.rb --- old/lib/fluent/plugin_helper/server.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/plugin_helper/server.rb 2017-12-06 15:05:10.000000000 +0100 @@ -661,22 +661,39 @@ end end + if RUBY_VERSION.to_f >= 2.3 + NONBLOCK_ARG = {exception: false} + def try_handshake + @_handler_socket.accept_nonblock(NONBLOCK_ARG) + end + else + def try_handshake + @_handler_socket.accept_nonblock + rescue IO::WaitReadable + :wait_readable + rescue IO::WaitWritable + :wait_writable + end + end + def try_tls_accept return true if @_handler_accepted begin - @_handler_socket.accept_nonblock # this method call actually try to do handshake via TLS - @_handler_accepted = true + result = try_handshake # this method call actually try to do handshake via TLS + if result == :wait_readable || result == :wait_writable + # retry accept_nonblock: there aren't enough data in underlying socket buffer + else + @_handler_accepted = true + + @callback_connection = TLSCallbackSocket.new(self) + @connect_callback.call(@callback_connection) + unless @data_callback + raise "connection callback must call #data to set data callback" + end - @callback_connection = TLSCallbackSocket.new(self) - @connect_callback.call(@callback_connection) - unless @data_callback - raise "connection callback must call #data to set data callback" + return true end - return true - - rescue IO::WaitReadable, IO::WaitWritable - # retry accept_nonblock: there aren't enough data in underlying socket buffer rescue OpenSSL::SSL::SSLError => e @log.trace "unexpected error before accepting TLS connection", error: e close rescue nil @@ -700,6 +717,7 @@ def on_writable begin @mutex.synchronize do + # Consider write_nonblock with {exception: false} when IO::WaitWritable error happens frequently. written_bytes = @_handler_socket.write_nonblock(@_handler_write_buffer) @_handler_write_buffer.slice!(0, written_bytes) super diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/fluent/version.rb new/lib/fluent/version.rb --- old/lib/fluent/version.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/lib/fluent/version.rb 2017-12-06 15:05:10.000000000 +0100 @@ -16,6 +16,6 @@ module Fluent - VERSION = '0.14.25' + VERSION = '1.0.0' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-11-30 07:09:39.000000000 +0100 +++ new/metadata 2017-12-06 15:05:10.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: fluentd version: !ruby/object:Gem::Version - version: 0.14.25 + version: 1.0.0 platform: ruby authors: - Sadayuki Furuhashi autorequire: bindir: bin cert_chain: [] -date: 2017-11-30 00:00:00.000000000 Z +date: 2017-12-06 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: msgpack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/plugin/test_out_copy.rb new/test/plugin/test_out_copy.rb --- old/test/plugin/test_out_copy.rb 2017-11-30 07:09:39.000000000 +0100 +++ new/test/plugin/test_out_copy.rb 2017-12-06 15:05:10.000000000 +0100 @@ -156,5 +156,36 @@ end end end + + IGNORE_ERROR_CONFIG = %[ + <store ignore_error> + @type test + name c0 + </store> + <store ignore_error> + @type test + name c1 + </store> + <store> + @type test + name c2 + </store> + ] + + def test_ignore_error + d = create_driver(IGNORE_ERROR_CONFIG) + + # override to raise an error + d.instance.outputs[0].define_singleton_method(:process) do |tag, es| + raise ArgumentError, 'Failed' + end + + time = Time.parse("2011-01-02 13:14:15 UTC").to_i + assert_nothing_raised do + d.run(default_tag: 'test') do + d.feed(time, {"a"=>1}) + end + end + end end