fluentd 1.17.1-x64-mingw-ucrt → 1.18.0-x64-mingw-ucrt

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e271725826bf1132c657ce04b564aec63417395cab2dfb780d222e37a2a5636
4
- data.tar.gz: abf26e9807ee2da4a085e75ec89c92b3ff4556369814c112e975524051ef7f5e
3
+ metadata.gz: c7055ccbfedb50b70c5c5e8faa278fc344f512512e9df4067a6a5570ae7da37a
4
+ data.tar.gz: 74a0834d59f04d01576eaaca3a79a89d4e442cfeda4321c3b33c0ef6b8131d4c
5
5
  SHA512:
6
- metadata.gz: f4bf20ec11bfdb8cbef2148fca499f230c22790a016d903678d09c41d677f35a2c2c4eb6a2a25155f82b9f9110dc7860a7d5b3fe6e471d174bc5910f3e551fa7
7
- data.tar.gz: b959c9bef0488b79ac4fa4e8ff21986ab8435ddf6b8e9c61a76dd906372270f8b3f3cbf8814a9c17d1d2c2dfdf36a7966809b52bbb63945aa8ce1db8dbcb1b85
6
+ metadata.gz: 8151e7385a51e5cc1efad405131ce5d63e57341efe92e55398448acd1ad9397ea368306eef121620258adeaae8e3aa9fd538ca33b550449655c8a8250fc439f1
7
+ data.tar.gz: 65bad71da998272b9065a74d5529d7078b096c9c4f2945b3e39fc3c3c3192796fe7f50d2706cb728d5eac81819f3a6d86ab6f79bee5bc29236f77cc23f1b1a9d
data/CHANGELOG.md CHANGED
@@ -1,13 +1,63 @@
1
+ # v1.18
2
+
3
+ ## Release v1.18.0 - 2024/11/29
4
+
5
+ ### Enhancement
6
+
7
+ * Add zero-downtime-restart feature for non-Windows
8
+ https://github.com/fluent/fluentd/pull/4624
9
+ * Add with-source-only feature
10
+ https://github.com/fluent/fluentd/pull/4661
11
+ * `fluentd` command: Add `--with-source-only` option
12
+ * System configuration: Add `with_source_only` option
13
+ * Embedded plugin: Add `out_buffer` plugin, which can be used for buffering and relabeling events
14
+ https://github.com/fluent/fluentd/pull/4661
15
+ * Config File Syntax: Extend Embedded Ruby Code support for Hashes and Arrays
16
+ https://github.com/fluent/fluentd/pull/4580
17
+ * Example: `key {"foo":"#{1 + 1}"} => key {"foo":"2"}`
18
+ * Please note that this is not backward compatible, although we assume that this will never affect to actual existing configs.
19
+ * In case the behavior changes unintentionally, you can disable this feature by surrounding the entire value with single quotes.
20
+ * `key '{"foo":"#{1 + 1}"}' => key {"foo":"#{1 + 1}"}`
21
+ * transport tls: Use SSL_VERIFY_NONE by default
22
+ https://github.com/fluent/fluentd/pull/4718
23
+ * transport tls: Add ensure_fips option to ensure FIPS compliant mode
24
+ https://github.com/fluent/fluentd/pull/4720
25
+ * plugin_helper/server: Add receive_buffer_size parameter in transport section
26
+ https://github.com/fluent/fluentd/pull/4649
27
+ * filter_parser: Now able to handle multiple parsed results
28
+ https://github.com/fluent/fluentd/pull/4620
29
+ * in_http: add `add_tag_prefix` option
30
+ https://github.com/fluent/fluentd/pull/4655
31
+ * System configuration: add `path` option in `log` section
32
+ https://github.com/fluent/fluentd/pull/4604
33
+
34
+ ### Bug Fix
35
+
36
+ * command: fix NoMethodError of --daemon under Windows
37
+ https://github.com/fluent/fluentd/pull/4716
38
+ * `fluentd` command: fix `--plugin` (`-p`) option not to overwrite default value
39
+ https://github.com/fluent/fluentd/pull/4605
40
+
41
+ ### Misc
42
+
43
+ * http_server: Ready to support Async 2.0 gem
44
+ https://github.com/fluent/fluentd/pull/4619
45
+ * Minor code refactoring
46
+ * https://github.com/fluent/fluentd/pull/4641
47
+ * CI fixes
48
+ * https://github.com/fluent/fluentd/pull/4638
49
+ * https://github.com/fluent/fluentd/pull/4644
50
+ * https://github.com/fluent/fluentd/pull/4675
51
+ * https://github.com/fluent/fluentd/pull/4676
52
+ * https://github.com/fluent/fluentd/pull/4677
53
+ * https://github.com/fluent/fluentd/pull/4686
54
+
1
55
  # v1.17
2
56
 
3
57
  ## Release v1.17.1 - 2024/08/19
4
58
 
5
59
  ### Enhancement
6
60
 
7
- * yaml_parser: Support $log_level element
8
- https://github.com/fluent/fluentd/pull/4482
9
- * out_file: Add warn message for symlink_path setting
10
- https://github.com/fluent/fluentd/pull/4502
11
61
  * out_http: Add `compress gzip` option
12
62
  https://github.com/fluent/fluentd/pull/4528
13
63
  * in_exec: Add `encoding` option to handle non-ascii characters
@@ -30,6 +80,8 @@
30
80
  https://github.com/fluent/fluentd/pull/4522
31
81
  * in_tail: Fix an issue where a large single line could consume a large amount of memory even though `max_line_size` is set
32
82
  https://github.com/fluent/fluentd/pull/4530
83
+ * yaml_parser: Support $log_level element
84
+ https://github.com/fluent/fluentd/pull/4482
33
85
 
34
86
  ### Misc
35
87
 
@@ -45,6 +97,8 @@
45
97
  https://github.com/fluent/fluentd/pull/4598
46
98
  * Add logger gem dependency for Ruby 3.5
47
99
  https://github.com/fluent/fluentd/pull/4589
100
+ * out_file: Add warn message for symlink_path setting
101
+ https://github.com/fluent/fluentd/pull/4502
48
102
 
49
103
  ## Release v1.17.0 - 2024/04/30
50
104
 
@@ -46,7 +46,7 @@ op.on('--show-plugin-config=PLUGIN', "[DEPRECATED] Show PLUGIN configuration and
46
46
  }
47
47
 
48
48
  op.on('-p', '--plugin DIR', "add plugin directory") {|s|
49
- (cmd_opts[:plugin_dirs] ||= []) << s
49
+ (cmd_opts[:plugin_dirs] ||= default_opts[:plugin_dirs]) << s
50
50
  }
51
51
 
52
52
  op.on('-I PATH', "add library path") {|s|
@@ -127,6 +127,12 @@ op.on('--without-source', "invoke a fluentd without input plugins", TrueClass) {
127
127
  cmd_opts[:without_source] = b
128
128
  }
129
129
 
130
+ unless Fluent.windows?
131
+ op.on('--with-source-only', "Invoke a fluentd only with input plugins. The data is stored in a temporary buffer. Send SIGWINCH to cancel this mode and process the data (Not supported on Windows).", TrueClass) {|b|
132
+ cmd_opts[:with_source_only] = b
133
+ }
134
+ end
135
+
130
136
  op.on('--config-file-type VALU', 'guessing file type of fluentd configuration. yaml/yml or guess') { |s|
131
137
  if (s == 'yaml') || (s == 'yml')
132
138
  cmd_opts[:config_file_type] = s.to_sym
@@ -254,8 +254,15 @@ EOM
254
254
  buffer << line_buffer + "\n"
255
255
  line_buffer = ""
256
256
  else
257
- # '#' is a char in json string
258
- line_buffer << char
257
+ if @ss.exist?(/^\{[^}]+\}/)
258
+ # if it's interpolated string
259
+ skip(/\{/)
260
+ line_buffer << eval_embedded_code(scan_embedded_code)
261
+ skip(/\}/)
262
+ else
263
+ # '#' is a char in json string
264
+ line_buffer << char
265
+ end
259
266
  end
260
267
 
261
268
  next # This char '#' MUST NOT terminate json object.
data/lib/fluent/engine.rb CHANGED
@@ -43,13 +43,15 @@ module Fluent
43
43
  @system_config = SystemConfig.new
44
44
 
45
45
  @supervisor_mode = false
46
+
47
+ @root_agent_mutex = Mutex.new
46
48
  end
47
49
 
48
50
  MAINLOOP_SLEEP_INTERVAL = 0.3
49
51
 
50
52
  attr_reader :root_agent, :system_config, :supervisor_mode
51
53
 
52
- def init(system_config, supervisor_mode: false)
54
+ def init(system_config, supervisor_mode: false, start_in_parallel: false)
53
55
  @system_config = system_config
54
56
  @supervisor_mode = supervisor_mode
55
57
 
@@ -58,7 +60,7 @@ module Fluent
58
60
 
59
61
  @log_event_verbose = system_config.log_event_verbose unless system_config.log_event_verbose.nil?
60
62
 
61
- @root_agent = RootAgent.new(log: log, system_config: @system_config)
63
+ @root_agent = RootAgent.new(log: log, system_config: @system_config, start_in_parallel: start_in_parallel)
62
64
 
63
65
  self
64
66
  end
@@ -133,7 +135,15 @@ module Fluent
133
135
  end
134
136
 
135
137
  def flush!
136
- @root_agent.flush!
138
+ @root_agent_mutex.synchronize do
139
+ @root_agent.flush!
140
+ end
141
+ end
142
+
143
+ def cancel_source_only!
144
+ @root_agent_mutex.synchronize do
145
+ @root_agent.cancel_source_only!
146
+ end
137
147
  end
138
148
 
139
149
  def now
@@ -144,7 +154,9 @@ module Fluent
144
154
  def run
145
155
  begin
146
156
  $log.info "starting fluentd worker", pid: Process.pid, ppid: Process.ppid, worker: worker_id
147
- start
157
+ @root_agent_mutex.synchronize do
158
+ start
159
+ end
148
160
 
149
161
  @fluent_log_event_router.start
150
162
 
@@ -158,47 +170,51 @@ module Fluent
158
170
  raise
159
171
  end
160
172
 
161
- stop_phase(@root_agent)
173
+ @root_agent_mutex.synchronize do
174
+ stop_phase(@root_agent)
175
+ end
162
176
  end
163
177
 
164
178
  # @param conf [Fluent::Config]
165
179
  # @param supervisor [Bool]
166
180
  # @reutrn nil
167
181
  def reload_config(conf, supervisor: false)
168
- # configure first to reduce down time while restarting
169
- new_agent = RootAgent.new(log: log, system_config: @system_config)
170
- ret = Fluent::StaticConfigAnalysis.call(conf, workers: system_config.workers)
171
-
172
- ret.all_plugins.each do |plugin|
173
- if plugin.respond_to?(:reloadable_plugin?) && !plugin.reloadable_plugin?
174
- raise Fluent::ConfigError, "Unreloadable plugin plugin: #{Fluent::Plugin.lookup_type_from_class(plugin.class)}, plugin_id: #{plugin.plugin_id}, class_name: #{plugin.class})"
182
+ @root_agent_mutex.synchronize do
183
+ # configure first to reduce down time while restarting
184
+ new_agent = RootAgent.new(log: log, system_config: @system_config)
185
+ ret = Fluent::StaticConfigAnalysis.call(conf, workers: system_config.workers)
186
+
187
+ ret.all_plugins.each do |plugin|
188
+ if plugin.respond_to?(:reloadable_plugin?) && !plugin.reloadable_plugin?
189
+ raise Fluent::ConfigError, "Unreloadable plugin plugin: #{Fluent::Plugin.lookup_type_from_class(plugin.class)}, plugin_id: #{plugin.plugin_id}, class_name: #{plugin.class})"
190
+ end
175
191
  end
176
- end
177
192
 
178
- # Assign @root_agent to new root_agent
179
- # for https://github.com/fluent/fluentd/blob/fcef949ce40472547fde295ddd2cfe297e1eddd6/lib/fluent/plugin_helper/event_emitter.rb#L50
180
- old_agent, @root_agent = @root_agent, new_agent
181
- begin
182
- @root_agent.configure(conf)
183
- rescue
184
- @root_agent = old_agent
185
- raise
186
- end
193
+ # Assign @root_agent to new root_agent
194
+ # for https://github.com/fluent/fluentd/blob/fcef949ce40472547fde295ddd2cfe297e1eddd6/lib/fluent/plugin_helper/event_emitter.rb#L50
195
+ old_agent, @root_agent = @root_agent, new_agent
196
+ begin
197
+ @root_agent.configure(conf)
198
+ rescue
199
+ @root_agent = old_agent
200
+ raise
201
+ end
187
202
 
188
- unless @suppress_config_dump
189
- $log.info :supervisor, "using configuration file: #{conf.to_s.rstrip}"
190
- end
203
+ unless @suppress_config_dump
204
+ $log.info :supervisor, "using configuration file: #{conf.to_s.rstrip}"
205
+ end
191
206
 
192
- # supervisor doesn't handle actual data. so the following code is unnecessary.
193
- if supervisor
194
- old_agent.shutdown # to close thread created in #configure
195
- return
196
- end
207
+ # supervisor doesn't handle actual data. so the following code is unnecessary.
208
+ if supervisor
209
+ old_agent.shutdown # to close thread created in #configure
210
+ return
211
+ end
197
212
 
198
- stop_phase(old_agent)
213
+ stop_phase(old_agent)
199
214
 
200
- $log.info 'restart fluentd worker', worker: worker_id
201
- start_phase(new_agent)
215
+ $log.info 'restart fluentd worker', worker: worker_id
216
+ start_phase(new_agent)
217
+ end
202
218
  end
203
219
 
204
220
  def stop
data/lib/fluent/env.rb CHANGED
@@ -14,6 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
+ require 'securerandom'
18
+
17
19
  require 'serverengine/utils'
18
20
  require 'fluent/oj_options'
19
21
 
@@ -25,6 +27,7 @@ module Fluent
25
27
  DEFAULT_OJ_OPTIONS = Fluent::OjOptions.load_env
26
28
  DEFAULT_DIR_PERMISSION = 0755
27
29
  DEFAULT_FILE_PERMISSION = 0644
30
+ INSTANCE_ID = ENV['FLUENT_INSTANCE_ID'] || SecureRandom.uuid
28
31
 
29
32
  def self.windows?
30
33
  ServerEngine.windows?
@@ -286,7 +286,7 @@ module Fluent
286
286
 
287
287
  def find(tag)
288
288
  pipeline = nil
289
- @match_rules.each_with_index { |rule, i|
289
+ @match_rules.each do |rule|
290
290
  if rule.match?(tag)
291
291
  if rule.collector.is_a?(Plugin::Filter)
292
292
  pipeline ||= Pipeline.new
@@ -301,7 +301,7 @@ module Fluent
301
301
  return pipeline
302
302
  end
303
303
  end
304
- }
304
+ end
305
305
 
306
306
  if pipeline
307
307
  # filter is matched but no match
@@ -54,29 +54,32 @@ module Fluent::Plugin
54
54
  @parser = parser_create
55
55
  end
56
56
 
57
- FAILED_RESULT = [nil, nil].freeze # reduce allocation cost
58
57
  REPLACE_CHAR = '?'.freeze
59
58
 
60
- def filter_with_time(tag, time, record)
61
- raw_value = @accessor.call(record)
62
- if raw_value.nil?
63
- if @emit_invalid_record_to_error
64
- router.emit_error_event(tag, time, record, ArgumentError.new("#{@key_name} does not exist"))
65
- end
66
- if @reserve_data
67
- return time, handle_parsed(tag, record, time, {})
68
- else
69
- return FAILED_RESULT
59
+ def filter_stream(tag, es)
60
+ new_es = Fluent::MultiEventStream.new
61
+ es.each do |time, record|
62
+ begin
63
+ raw_value = @accessor.call(record)
64
+ if raw_value.nil?
65
+ new_es.add(time, handle_parsed(tag, record, time, {})) if @reserve_data
66
+ raise ArgumentError, "#{@key_name} does not exist"
67
+ else
68
+ filter_one_record(tag, time, record, raw_value) do |result_time, result_record|
69
+ new_es.add(result_time, result_record)
70
+ end
71
+ end
72
+ rescue => e
73
+ router.emit_error_event(tag, time, record, e) if @emit_invalid_record_to_error
70
74
  end
71
75
  end
72
- begin
73
- # Note: https://github.com/fluent/fluentd/issues/4100
74
- # If the parser returns multiple records from one raw_value,
75
- # this returns only the first one record.
76
- # This should be fixed in the future version.
77
- result_time = nil
78
- result_record = nil
76
+ new_es
77
+ end
78
+
79
+ private
79
80
 
81
+ def filter_one_record(tag, time, record, raw_value)
82
+ begin
80
83
  @parser.parse(raw_value) do |t, values|
81
84
  if values
82
85
  t = if @reserve_time
@@ -85,38 +88,17 @@ module Fluent::Plugin
85
88
  t.nil? ? time : t
86
89
  end
87
90
  @accessor.delete(record) if @remove_key_name_field
88
- r = handle_parsed(tag, record, t, values)
89
-
90
- if result_record.nil?
91
- result_time = t
92
- result_record = r
93
- else
94
- if @emit_invalid_record_to_error
95
- router.emit_error_event(tag, t, r, Fluent::Plugin::Parser::ParserError.new(
96
- "Could not emit the event. The parser returned multiple results, but currently filter_parser plugin only returns the first parsed result. Raw data: '#{raw_value}'"
97
- ))
98
- end
99
- end
100
91
  else
101
- if @emit_invalid_record_to_error
102
- router.emit_error_event(tag, time, record, Fluent::Plugin::Parser::ParserError.new("pattern not matched with data '#{raw_value}'"))
103
- end
104
-
92
+ router.emit_error_event(tag, time, record, Fluent::Plugin::Parser::ParserError.new("pattern not matched with data '#{raw_value}'")) if @emit_invalid_record_to_error
105
93
  next unless @reserve_data
106
- next unless result_record.nil?
107
-
108
- result_time = time
109
- result_record = handle_parsed(tag, record, time, {})
94
+ t = time
95
+ values = {}
110
96
  end
97
+ yield(t, handle_parsed(tag, record, t, values))
111
98
  end
112
99
 
113
- return result_time, result_record
114
100
  rescue Fluent::Plugin::Parser::ParserError => e
115
- if @emit_invalid_record_to_error
116
- raise e
117
- else
118
- return FAILED_RESULT
119
- end
101
+ raise e
120
102
  rescue ArgumentError => e
121
103
  raise unless @replace_invalid_sequence
122
104
  raise unless e.message.index("invalid byte sequence in") == 0
@@ -124,16 +106,10 @@ module Fluent::Plugin
124
106
  raw_value = raw_value.scrub(REPLACE_CHAR)
125
107
  retry
126
108
  rescue => e
127
- if @emit_invalid_record_to_error
128
- raise Fluent::Plugin::Parser::ParserError, "parse failed #{e.message}"
129
- else
130
- return FAILED_RESULT
131
- end
109
+ raise Fluent::Plugin::Parser::ParserError, "parse failed #{e.message}"
132
110
  end
133
111
  end
134
112
 
135
- private
136
-
137
113
  def handle_parsed(tag, record, t, values)
138
114
  if values && @inject_key_prefix
139
115
  values = Hash[values.map { |k, v| [@inject_key_prefix + k, v] }]
@@ -84,6 +84,8 @@ module Fluent::Plugin
84
84
  config_param :dump_error_log, :bool, default: true
85
85
  desc 'Add QUERY_ prefix query params to record'
86
86
  config_param :add_query_params, :bool, default: false
87
+ desc "Add prefix to incoming tag"
88
+ config_param :add_tag_prefix, :string, default: nil
87
89
 
88
90
  config_section :parse do
89
91
  config_set_default :@type, 'in_http'
@@ -120,6 +122,8 @@ module Fluent::Plugin
120
122
  end
121
123
  end
122
124
 
125
+ raise Fluent::ConfigError, "'add_tag_prefix' parameter must not be empty" if @add_tag_prefix && @add_tag_prefix.empty?
126
+
123
127
  m = if @parser_configs.first['@type'] == 'in_http'
124
128
  @parser_msgpack = parser_create(usage: 'parser_in_http_msgpack', type: 'msgpack')
125
129
  @parser_msgpack.time_key = nil
@@ -203,6 +207,7 @@ module Fluent::Plugin
203
207
  begin
204
208
  path = path_info[1..-1] # remove /
205
209
  tag = path.split('/').join('.')
210
+ tag = "#{@add_tag_prefix}.#{tag}" if @add_tag_prefix
206
211
 
207
212
  mes = Fluent::MultiEventStream.new
208
213
  parse_params(params) do |record_time, record|
@@ -156,6 +156,10 @@ module Fluent::Plugin
156
156
  true
157
157
  end
158
158
 
159
+ def zero_downtime_restart_ready?
160
+ true
161
+ end
162
+
159
163
  def start
160
164
  super
161
165
 
@@ -101,6 +101,10 @@ module Fluent::Plugin
101
101
  true
102
102
  end
103
103
 
104
+ def zero_downtime_restart_ready?
105
+ true
106
+ end
107
+
104
108
  def start
105
109
  super
106
110
 
@@ -43,10 +43,15 @@ module Fluent::Plugin
43
43
  desc "Remove newline from the end of incoming payload"
44
44
  config_param :remove_newline, :bool, default: true
45
45
  desc "The max size of socket receive buffer. SO_RCVBUF"
46
- config_param :receive_buffer_size, :size, default: nil
46
+ config_param :receive_buffer_size, :size, default: nil, deprecated: "use receive_buffer_size in transport section instead."
47
47
 
48
48
  config_param :blocking_timeout, :time, default: 0.5
49
49
 
50
+ # overwrite server plugin to change default to :udp and remove tcp/tls protocol from list
51
+ config_section :transport, required: false, multi: false, init: true, param_name: :transport_config do
52
+ config_argument :protocol, :enum, list: [:udp], default: :udp
53
+ end
54
+
50
55
  def configure(conf)
51
56
  compat_parameters_convert(conf, :parser)
52
57
  parser_config = conf.elements('parse').first
@@ -65,6 +70,10 @@ module Fluent::Plugin
65
70
  true
66
71
  end
67
72
 
73
+ def zero_downtime_restart_ready?
74
+ true
75
+ end
76
+
68
77
  def start
69
78
  super
70
79
 
@@ -70,6 +70,10 @@ module Fluent
70
70
  def multi_workers_ready?
71
71
  false
72
72
  end
73
+
74
+ def zero_downtime_restart_ready?
75
+ false
76
+ end
73
77
  end
74
78
  end
75
79
  end
@@ -0,0 +1,40 @@
1
+ #
2
+ # Fluentd
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ require 'fluent/plugin/output'
18
+
19
+ module Fluent::Plugin
20
+ class BufferOutput < Output
21
+ Fluent::Plugin.register_output("buffer", self)
22
+ helpers :event_emitter
23
+
24
+ config_section :buffer do
25
+ config_set_default :@type, "file"
26
+ config_set_default :chunk_keys, ["tag"]
27
+ config_set_default :flush_mode, :interval
28
+ config_set_default :flush_interval, 10
29
+ end
30
+
31
+ def multi_workers_ready?
32
+ true
33
+ end
34
+
35
+ def write(chunk)
36
+ return if chunk.empty?
37
+ router.emit_stream(chunk.metadata.tag, Fluent::MessagePackEventStream.new(chunk.read))
38
+ end
39
+ end
40
+ end
@@ -1384,6 +1384,7 @@ module Fluent
1384
1384
  end
1385
1385
 
1386
1386
  def submit_flush_once
1387
+ return unless @buffer_config.flush_thread_count > 0
1387
1388
  # Without locks: it is rough but enough to select "next" writer selection
1388
1389
  @output_flush_thread_current_position = (@output_flush_thread_current_position + 1) % @buffer_config.flush_thread_count
1389
1390
  state = @output_flush_threads[@output_flush_thread_current_position]
@@ -1406,6 +1407,7 @@ module Fluent
1406
1407
  end
1407
1408
 
1408
1409
  def submit_flush_all
1410
+ return unless @buffer_config.flush_thread_count > 0
1409
1411
  while !@retry && @buffer.queued?
1410
1412
  submit_flush_once
1411
1413
  sleep @buffer_config.flush_thread_burst_interval
@@ -33,6 +33,14 @@ module Fluent
33
33
 
34
34
  if conf.client_cert_auth
35
35
  ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT
36
+ else
37
+ ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
38
+ end
39
+
40
+ if conf.ensure_fips
41
+ unless OpenSSL.fips_mode
42
+ raise Fluent::ConfigError, "Cannot enable FIPS compliant mode. OpenSSL FIPS configuration is disabled"
43
+ end
36
44
  end
37
45
 
38
46
  ctx.ca_file = conf.ca_path
@@ -26,6 +26,9 @@ module Fluent
26
26
 
27
27
  def router
28
28
  @_event_emitter_used_actually = true
29
+
30
+ return Engine.root_agent.source_only_router if @_event_emitter_force_source_only_router
31
+
29
32
  if @_event_emitter_lazy_init
30
33
  @router = @primary_instance.router
31
34
  end
@@ -48,6 +51,14 @@ module Fluent
48
51
  @_event_emitter_used_actually
49
52
  end
50
53
 
54
+ def event_emitter_apply_source_only
55
+ @_event_emitter_force_source_only_router = true
56
+ end
57
+
58
+ def event_emitter_cancel_source_only
59
+ @_event_emitter_force_source_only_router = false
60
+ end
61
+
51
62
  def event_emitter_router(label_name)
52
63
  if label_name
53
64
  if label_name == "@ROOT"
@@ -72,6 +83,7 @@ module Fluent
72
83
  super
73
84
  @_event_emitter_used_actually = false
74
85
  @_event_emitter_lazy_init = false
86
+ @_event_emitter_force_source_only_router = false
75
87
  @router = nil
76
88
  end
77
89