fluentd 1.12.0-x86-mingw32 → 1.12.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdc76f6f11cb61d39493ea75cf0c0a473f9cf8f2aeb52904b33611cddb2f7e59
4
- data.tar.gz: e47317af7d0e5d22b6dd54e1ad3c23a77652ed3441851549699b7f8f2f7577f0
3
+ metadata.gz: efe5129f312dd3485a7afab8d80752927f81d25d9f082d02777872172f2a9530
4
+ data.tar.gz: 5c172af998e60bc1556f2ea19540aa0892fecba7e6f7b0b3441be96dd2e414f5
5
5
  SHA512:
6
- metadata.gz: 55a69af50c96ab66919f00f488558353bddbb799682f1987a4e1bcef68ef93e28a9bd721735306c4aad21fd85e08f233ebf4aff79f81b42a61ced3c5fe39119e
7
- data.tar.gz: c5a4da161a352b210cb9c57bb6f5119f2131ca86f107924bd1f45e65ed924d2e483ebe94559a80e8e054fc88badffeb53785bc65097ea903fddff3ec3ca1d811
6
+ metadata.gz: 396d04f2099a3943b3f0902cc09cc9d8903c00ecedac03a6e64864177faf99bf912fbf4a1a7f1e5dda31e107d28028a6f2bde5bdd2e360c32ee3c32c74b9f297
7
+ data.tar.gz: 98502195dc14d04ce14b54b8f9afdfcbc847f710a5d1f0711ca04f7a081828e961eb9ee5d8e0a7d9d4039adeb152178399b9d0e49d86f8c2e919421e343782c1
@@ -0,0 +1,29 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby-version: [2.7, 2.6, 2.5]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ - name: Install addons
25
+ run: sudo apt-get install libgmp3-dev libcap-ng-dev
26
+ - name: Install dependencies
27
+ run: bundle install
28
+ - name: Run tests
29
+ run: bundle exec rake test TESTOPTS=-v
data/CHANGELOG.md CHANGED
@@ -1,6 +1,31 @@
1
1
  # v1.12
2
2
 
3
- ## Release v1.12.0 - 2020/01/05
3
+ ## Release v1.12.1 - 2021/02/18
4
+
5
+ ### Enhancement
6
+
7
+ * out_http: Add `headers_from_placeholders` parameter
8
+ https://github.com/fluent/fluentd/pull/3241
9
+ * fluent-plugin-config-format: Add `--table` option to use markdown table
10
+ https://github.com/fluent/fluentd/pull/3240
11
+ * Add `--disable-shared-socket`/`disable_shared_socket` to disable ServerEngine's shared socket setup
12
+ https://github.com/fluent/fluentd/pull/3250
13
+
14
+ ### Bug fix
15
+
16
+ * ca_generate: Fix creating TLS certification files which include broken extensions
17
+ https://github.com/fluent/fluentd/pull/3246
18
+ * test: Drop TLS 1.1 tests
19
+ https://github.com/fluent/fluentd/pull/3256
20
+ * Remove old gem constraints to support Ruby 3
21
+
22
+ ### Misc
23
+
24
+ * Use GitHub Actions
25
+ https://github.com/fluent/fluentd/pull/3233
26
+ https://github.com/fluent/fluentd/pull/3255
27
+
28
+ ## Release v1.12.0 - 2021/01/05
4
29
 
5
30
  ### New feature
6
31
 
@@ -14,7 +39,7 @@
14
39
 
15
40
  ### Enhancement
16
41
 
17
- * buffer: Enable metadata comparison optimization on all platform
42
+ * buffer: Enable metadata comparison optimization on all platforms
18
43
  https://github.com/fluent/fluentd/pull/3095
19
44
  * fluent-plugin-config-formatter: Handle `service_discovery` type
20
45
  https://github.com/fluent/fluentd/pull/3178
data/README.md CHANGED
@@ -78,7 +78,7 @@ You can run specified test via `TEST` environment variable:
78
78
  - Slack / Community: https://slack.fluentd.org
79
79
  - Newsletters: https://www.fluentd.org/newsletter
80
80
  - Author: [Sadayuki Furuhashi](https://github.com/frsyuki)
81
- - Copyright: 2011-2019 Fluentd Authors
81
+ - Copyright: 2011-2021 Fluentd Authors
82
82
  - License: Apache License, Version 2.0
83
83
 
84
84
  ## Security
data/fluentd.gemspec CHANGED
@@ -49,6 +49,5 @@ Gem::Specification.new do |gem|
49
49
  gem.add_development_dependency("test-unit", ["~> 3.3"])
50
50
  gem.add_development_dependency("test-unit-rr", ["~> 1.0"])
51
51
  gem.add_development_dependency("oj", [">= 2.14", "< 4"])
52
- gem.add_development_dependency("ext_monitor", [">= 0.1.2", "< 0.2"])
53
- gem.add_development_dependency("async-http")
52
+ gem.add_development_dependency("async-http", ">= 0.50.0")
54
53
  end
@@ -75,6 +75,8 @@ HELP
75
75
 
76
76
  digest = OpenSSL::Digest::SHA256.new
77
77
 
78
+ factory = OpenSSL::X509::ExtensionFactory.new
79
+
78
80
  cert = OpenSSL::X509::Certificate.new
79
81
  cert.not_before = Time.at(0)
80
82
  cert.not_after = Time.now + 5 * 365 * 86400 # 5 years after
@@ -82,7 +84,7 @@ HELP
82
84
  cert.serial = 1
83
85
  cert.issuer = issuer
84
86
  cert.subject = subject
85
- cert.add_extension OpenSSL::X509::Extension.new('basicConstraints', OpenSSL::ASN1.Sequence([OpenSSL::ASN1::Boolean(true)]))
87
+ cert.add_extension(factory.create_extension('basicConstraints', 'CA:TRUE'))
86
88
  cert.sign(key, digest)
87
89
 
88
90
  return cert, key
@@ -111,8 +113,9 @@ HELP
111
113
  cert.issuer = issuer
112
114
  cert.subject = subject
113
115
 
114
- cert.add_extension OpenSSL::X509::Extension.new('basicConstraints', OpenSSL::ASN1.Sequence([OpenSSL::ASN1::Boolean(false)]))
115
- cert.add_extension OpenSSL::X509::Extension.new('nsCertType', 'server')
116
+ factory = OpenSSL::X509::ExtensionFactory.new
117
+ server_cert.add_extension(factory.create_extension('basicConstraints', 'CA:FALSE'))
118
+ server_cert.add_extension(factory.create_extension('nsCertType', 'server'))
116
119
 
117
120
  cert.sign ca_key, digest
118
121
 
@@ -163,6 +163,10 @@ op.on('--conf-encoding ENCODING', "specify configuration file encoding") { |s|
163
163
  opts[:conf_encoding] = s
164
164
  }
165
165
 
166
+ op.on('--disable-shared-socket', "Don't open shared socket for multiple workers") { |b|
167
+ opts[:disable_shared_socket] = b
168
+ }
169
+
166
170
  if Fluent.windows?
167
171
  require 'windows/library'
168
172
  include Windows::Library
@@ -162,9 +162,20 @@ class FluentPluginConfigFormatter
162
162
  else
163
163
  sections, params = base_section.partition {|_name, value| value[:section] }
164
164
  end
165
+ if @table and not params.empty?
166
+ dumped << "### Configuration\n\n"
167
+ dumped << "|parameter|type|description|default|\n"
168
+ dumped << "|---|---|---|---|\n"
169
+ end
165
170
  params.each do |name, config|
166
171
  next if name == :section
167
- template_name = @compact ? "param.md-compact.erb" : "param.md.erb"
172
+ template_name = if @compact
173
+ "param.md-compact.erb"
174
+ elsif @table
175
+ "param.md-table.erb"
176
+ else
177
+ "param.md.erb"
178
+ end
168
179
  template = template_path(template_name).read
169
180
  dumped <<
170
181
  if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
@@ -257,6 +268,9 @@ BANNER
257
268
  @parser.on("-p", "--plugin=DIR", "Add plugin directory") do |s|
258
269
  @plugin_dirs << s
259
270
  end
271
+ @parser.on("-t", "--table", "Use table syntax to dump parameters") do
272
+ @table = true
273
+ end
260
274
  end
261
275
 
262
276
  def parse_options!
@@ -247,7 +247,7 @@ module Fluent
247
247
  def self.check_unused_section(proxy, conf, plugin_class)
248
248
  elems = conf.respond_to?(:elements) ? conf.elements : []
249
249
  elems.each { |e|
250
- next if plugin_class.nil? && Fluent::Config::V1Parser::ELEM_SYMBOLS.include?(e.name) # skip pre-defined non-plugin elements because it doens't have proxy section
250
+ next if plugin_class.nil? && Fluent::Config::V1Parser::ELEM_SYMBOLS.include?(e.name) # skip pre-defined non-plugin elements because it doesn't have proxy section
251
251
  next if e.unused_in && e.unused_in.empty? # the section is used at least once
252
252
 
253
253
  if proxy.sections.any? { |name, subproxy| e.name == subproxy.name.to_s || e.name == subproxy.alias.to_s }
@@ -51,6 +51,8 @@ module Fluent::Plugin
51
51
  config_param :json_array, :bool, default: false
52
52
  desc 'Additional headers for HTTP request'
53
53
  config_param :headers, :hash, default: nil
54
+ desc 'Additional placeholder based headers for HTTP request'
55
+ config_param :headers_from_placeholders, :hash, default: nil
54
56
 
55
57
  desc 'The connection open timeout in seconds'
56
58
  config_param :open_timeout, :integer, default: nil
@@ -213,12 +215,17 @@ module Fluent::Plugin
213
215
  URI.parse(endpoint)
214
216
  end
215
217
 
216
- def set_headers(req)
218
+ def set_headers(req, chunk)
217
219
  if @headers
218
220
  @headers.each do |k, v|
219
221
  req[k] = v
220
222
  end
221
223
  end
224
+ if @headers_from_placeholders
225
+ @headers_from_placeholders.each do |k, v|
226
+ req[k] = extract_placeholders(v, chunk)
227
+ end
228
+ end
222
229
  req['Content-Type'] = @content_type
223
230
  end
224
231
 
@@ -232,7 +239,7 @@ module Fluent::Plugin
232
239
  if @auth
233
240
  req.basic_auth(@auth.username, @auth.password)
234
241
  end
235
- set_headers(req)
242
+ set_headers(req, chunk)
236
243
  req.body = @json_array ? "[#{chunk.read.chop}]" : chunk.read
237
244
  req
238
245
  end
@@ -45,6 +45,7 @@ module Fluent
45
45
  module ServerModule
46
46
  def before_run
47
47
  @fluentd_conf = config[:fluentd_conf]
48
+ @rpc_endpoint = nil
48
49
  @rpc_server = nil
49
50
  @counter = nil
50
51
 
@@ -64,9 +65,13 @@ module Fluent
64
65
  run_counter_server(counter)
65
66
  end
66
67
 
67
- socket_manager_path = ServerEngine::SocketManager::Server.generate_path
68
- ServerEngine::SocketManager::Server.open(socket_manager_path)
69
- ENV['SERVERENGINE_SOCKETMANAGER_PATH'] = socket_manager_path.to_s
68
+ if config[:disable_shared_socket]
69
+ $log.info "shared socket for multiple workers is disabled"
70
+ else
71
+ socket_manager_path = ServerEngine::SocketManager::Server.generate_path
72
+ ServerEngine::SocketManager::Server.open(socket_manager_path)
73
+ ENV['SERVERENGINE_SOCKETMANAGER_PATH'] = socket_manager_path.to_s
74
+ end
70
75
  end
71
76
 
72
77
  def after_run
@@ -452,6 +457,7 @@ module Fluent
452
457
  config_path: path,
453
458
  main_cmd: params['main_cmd'],
454
459
  signame: params['signame'],
460
+ disable_shared_socket: params['disable_shared_socket']
455
461
  }
456
462
  if daemonize
457
463
  se_config[:pid_path] = pid_path
@@ -567,7 +573,8 @@ module Fluent
567
573
  supervise: true,
568
574
  standalone_worker: false,
569
575
  signame: nil,
570
- conf_encoding: 'utf-8'
576
+ conf_encoding: 'utf-8',
577
+ disable_shared_socket: nil
571
578
  }
572
579
  end
573
580
 
@@ -795,6 +802,7 @@ module Fluent
795
802
  'counter_server' => @system_config.counter_server,
796
803
  'log_format' => @system_config.log.format,
797
804
  'log_time_format' => @system_config.log.time_format,
805
+ 'disable_shared_socket' => @system_config.disable_shared_socket
798
806
  }
799
807
 
800
808
  se = ServerEngine.create(ServerModule, WorkerModule){
@@ -27,7 +27,7 @@ module Fluent
27
27
  :log_event_verbose, :ignore_repeated_log_interval, :ignore_same_log_interval,
28
28
  :without_source, :rpc_endpoint, :enable_get_dump, :process_name,
29
29
  :file_permission, :dir_permission, :counter_server, :counter_client,
30
- :strict_config_value, :enable_msgpack_time_support
30
+ :strict_config_value, :enable_msgpack_time_support, :disable_shared_socket
31
31
  ]
32
32
 
33
33
  config_param :workers, :integer, default: 1
@@ -45,6 +45,7 @@ module Fluent
45
45
  config_param :process_name, :string, default: nil
46
46
  config_param :strict_config_value, :bool, default: nil
47
47
  config_param :enable_msgpack_time_support, :bool, default: nil
48
+ config_param :disable_shared_socket, :bool, default: nil
48
49
  config_param :file_permission, default: nil do |v|
49
50
  v.to_i(8)
50
51
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '1.12.0'
19
+ VERSION = '1.12.1'
20
20
 
21
21
  end
@@ -0,0 +1,10 @@
1
+ <%-
2
+ type = config[:type]
3
+ required_label = config[:required] ? "required" : "optional"
4
+ default = config[:default]
5
+ alias_name = config[:alias]
6
+ deprecated = config[:deprecated]
7
+ obsoleted = config[:obsoleted]
8
+ description = config[:desc]
9
+ -%>
10
+ |<%= name %>|<%= type %> (<%= required_label %>)|<%= description %><%- if type == :enum -%> (<%= config[:list].map{|x| "`#{x}`"}.join(", ") %>)<%- end -%><%- if alias_name -%><br>Alias: <%= alias_name %><%- end -%><%- if deprecated -%><br>Deprecated: <%= deprecated %><%- end -%><%- if obsoleted -%><br>Obsoleted: <%= :obsoleted %><%- end -%>|<%- if default -%>`<%= default %>`<%- end -%>|
@@ -1065,4 +1065,34 @@ CONF
1065
1065
  "secret xxxxxx", patterns_not_match: ["secret secret0", "secret secret1"])
1066
1066
  end
1067
1067
  end
1068
+
1069
+ sub_test_case 'sahred socket options' do
1070
+ test 'enable shared socket by default' do
1071
+ conf = ""
1072
+ conf_path = create_conf_file('empty.conf', conf)
1073
+ assert File.exist?(conf_path)
1074
+ assert_log_matches(create_cmdline(conf_path),
1075
+ patterns_not_match: ["shared socket for multiple workers is disabled"])
1076
+ end
1077
+
1078
+ test 'disable shared socket by command line option' do
1079
+ conf = ""
1080
+ conf_path = create_conf_file('empty.conf', conf)
1081
+ assert File.exist?(conf_path)
1082
+ assert_log_matches(create_cmdline(conf_path, "--disable-shared-socket"),
1083
+ "shared socket for multiple workers is disabled",)
1084
+ end
1085
+
1086
+ test 'disable shared socket by system config' do
1087
+ conf = <<CONF
1088
+ <system>
1089
+ disable_shared_socket
1090
+ </system>
1091
+ CONF
1092
+ conf_path = create_conf_file('empty.conf', conf)
1093
+ assert File.exist?(conf_path)
1094
+ assert_log_matches(create_cmdline(conf_path, "--disable-shared-socket"),
1095
+ "shared socket for multiple workers is disabled",)
1096
+ end
1097
+ end
1068
1098
  end
@@ -225,6 +225,30 @@ TEXT
225
225
  path to something
226
226
 
227
227
 
228
+ TEXT
229
+ assert_equal(expected, dumped_config)
230
+ end
231
+
232
+ test "input simple (table)" do
233
+ dumped_config = capture_stdout do
234
+ FluentPluginConfigFormatter.new(["--format=markdown", "--table", "input", "simple"]).call
235
+ end
236
+ expected = <<TEXT
237
+ ## Plugin helpers
238
+
239
+ * [inject](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-inject)
240
+ * [compat_parameters](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-compat_parameters)
241
+
242
+ * See also: [Input Plugin Overview](https://docs.fluentd.org/v/1.0/input#overview)
243
+
244
+ ## TestFluentPluginConfigFormatter::SimpleInput
245
+
246
+ ### Configuration
247
+
248
+ |parameter|type|description|default|
249
+ |---|---|---|---|
250
+ |path|string (required)|path to something||
251
+
228
252
  TEXT
229
253
  assert_equal(expected, dumped_config)
230
254
  end
@@ -298,6 +322,49 @@ Default value: `normal`.
298
322
 
299
323
 
300
324
 
325
+ TEXT
326
+ assert_equal(expected, dumped_config)
327
+ end
328
+
329
+ test "output complex (table)" do
330
+ dumped_config = capture_stdout do
331
+ FluentPluginConfigFormatter.new(["--format=markdown", "--table", "output", "complex"]).call
332
+ end
333
+ expected = <<TEXT
334
+ ## Plugin helpers
335
+
336
+ * [inject](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-inject)
337
+ * [compat_parameters](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-compat_parameters)
338
+
339
+ * See also: [Output Plugin Overview](https://docs.fluentd.org/v/1.0/output#overview)
340
+
341
+ ## TestFluentPluginConfigFormatter::ComplexOutput
342
+
343
+
344
+ ### \\<authentication\\> section (required) (single)
345
+
346
+ ### Configuration
347
+
348
+ |parameter|type|description|default|
349
+ |---|---|---|---|
350
+ |username|string (required)|username||
351
+ |password|string (required)|password||
352
+
353
+
354
+ ### \\<parent\\> section (optional) (multiple)
355
+
356
+
357
+ #### \\<child\\> section (optional) (multiple)
358
+
359
+ ### Configuration
360
+
361
+ |parameter|type|description|default|
362
+ |---|---|---|---|
363
+ |names|array (required)|names||
364
+ |difficulty|enum (optional)|difficulty (`easy`, `normal`, `hard`)|`normal`|
365
+
366
+
367
+
301
368
  TEXT
302
369
  assert_equal(expected, dumped_config)
303
370
  end
@@ -85,7 +85,7 @@ class IntailPositionFileTest < Test::Unit::TestCase
85
85
  assert_equal 5, lines.size
86
86
  end
87
87
 
88
- test 'update seek postion of remained position entry' do
88
+ test 'update seek position of remained position entry' do
89
89
  pf = Fluent::Plugin::TailInput::PositionFile.new(@file, false, {}, **{logger: $log})
90
90
  target_info1 = Fluent::Plugin::TailInput::TargetInfo.new('path1', -1)
91
91
  target_info2 = Fluent::Plugin::TailInput::TargetInfo.new('path2', -1)
@@ -280,6 +280,25 @@ class HTTPOutputTest < Test::Unit::TestCase
280
280
  assert_equal "fluentd!", result.headers['test_header']
281
281
  end
282
282
 
283
+ def test_write_with_headers_from_placeholders
284
+ d = create_driver(config + %[
285
+ headers_from_placeholders {"x-test":"${$.foo.bar}-test","x-tag":"${tag}"}
286
+ <buffer tag,$.foo.bar>
287
+ </buffer>
288
+ ])
289
+ d.run(default_tag: 'test.http') do
290
+ test_events.each { |event|
291
+ ev = event.dup
292
+ ev['foo'] = {'bar' => 'abcd'}
293
+ d.feed(ev)
294
+ }
295
+ end
296
+
297
+ result = @@result
298
+ assert_equal "abcd-test", result.headers['x-test']
299
+ assert_equal "test.http", result.headers['x-tag']
300
+ end
301
+
283
302
  def test_write_with_retryable_response
284
303
  old_report_on_exception = Thread.report_on_exception
285
304
  Thread.report_on_exception = false # thread finished as invalid state since RetryableResponse raises.
@@ -149,7 +149,7 @@ class FileServiceDiscoveryTest < ::Test::Unit::TestCase
149
149
  assert_empty queue
150
150
  end
151
151
 
152
- test 'Skip if error is occured' do
152
+ test 'Skip if error is occurred' do
153
153
  @sd_file.extend(TestStatEventHelperWrapper)
154
154
 
155
155
  create_tmp_config('config.json', JSON.generate([{ port: 1233, host: '127.0.0.1' }]))
@@ -132,7 +132,9 @@ class HttpHelperTest < Test::Unit::TestCase
132
132
  error = e
133
133
  end
134
134
 
135
- resp = Response.new(response.status.to_s, response.body.read, response.headers)
135
+ if response
136
+ resp = Response.new(response.status.to_s, response.body.read, response.headers)
137
+ end
136
138
  end
137
139
 
138
140
  if error
@@ -832,8 +832,9 @@ class ServerPluginHelperTest < Test::Unit::TestCase
832
832
  chain_cert.sign(root_key, "sha256")
833
833
 
834
834
  server_cert, server_key, _ = CertUtil.cert_option_generate_pair(create_server_options, chain_cert.subject)
835
- server_cert.add_extension OpenSSL::X509::Extension.new('basicConstraints', OpenSSL::ASN1.Sequence([OpenSSL::ASN1::Boolean(false)]))
836
- server_cert.add_extension OpenSSL::X509::Extension.new('nsCertType', 'server')
835
+ factory = OpenSSL::X509::ExtensionFactory.new
836
+ server_cert.add_extension(factory.create_extension('basicConstraints', 'CA:FALSE'))
837
+ server_cert.add_extension(factory.create_extension('nsCertType', 'server'))
837
838
  server_cert.sign(chain_key, "sha256")
838
839
 
839
840
  # write chained cert
@@ -1494,8 +1495,13 @@ class ServerPluginHelperTest < Test::Unit::TestCase
1494
1495
  test "can't connect with different TLS version" do
1495
1496
  @d.server_create_tls(:s, PORT, tls_options: @tls_options) do |data, conn|
1496
1497
  end
1498
+ if defined?(OpenSSL::SSL::TLS1_3_VERSION)
1499
+ version = :'TLS1_3'
1500
+ else
1501
+ version = :'TLS1_1'
1502
+ end
1497
1503
  assert_raise(OpenSSL::SSL::SSLError, Errno::ECONNRESET) {
1498
- open_tls_session('127.0.0.1', PORT, cert_path: @cert_path, version: :'TLS1_1') do |sock|
1504
+ open_tls_session('127.0.0.1', PORT, cert_path: @cert_path, version: version) do |sock|
1499
1505
  end
1500
1506
  }
1501
1507
  end
@@ -1503,14 +1509,21 @@ class ServerPluginHelperTest < Test::Unit::TestCase
1503
1509
  test "can specify multiple TLS versions by min_version/max_version" do
1504
1510
  omit "min_version=/max_version= is not supported" unless Fluent::TLS::MIN_MAX_AVAILABLE
1505
1511
 
1506
- opts = @tls_options.merge(min_version: :'TLS1_1', max_version: :'TLSv1_2')
1512
+ min_version = :'TLS1_2'
1513
+ if defined?(OpenSSL::SSL::TLS1_3_VERSION)
1514
+ max_version = :'TLS1_3'
1515
+ else
1516
+ max_version = :'TLS1_2'
1517
+ end
1518
+
1519
+ opts = @tls_options.merge(min_version: min_version, max_version: max_version)
1507
1520
  @d.server_create_tls(:s, PORT, tls_options: opts) do |data, conn|
1508
1521
  end
1509
1522
  assert_raise(OpenSSL::SSL::SSLError, Errno::ECONNRESET) {
1510
1523
  open_tls_session('127.0.0.1', PORT, cert_path: @cert_path, version: :'TLS1') do |sock|
1511
1524
  end
1512
1525
  }
1513
- [:'TLS1_1', :'TLS1_2'].each { |ver|
1526
+ [min_version, max_version].each { |ver|
1514
1527
  assert_nothing_raised {
1515
1528
  open_tls_session('127.0.0.1', PORT, cert_path: @cert_path, version: ver) do |sock|
1516
1529
  end
@@ -517,6 +517,37 @@ class SupervisorTest < ::Test::Unit::TestCase
517
517
  assert_equal Fluent::Log::LEVEL_ERROR, $log.level
518
518
  end
519
519
 
520
+ def test_enable_shared_socket
521
+ server = DummyServer.new
522
+ begin
523
+ ENV.delete('SERVERENGINE_SOCKETMANAGER_PATH')
524
+ server.before_run
525
+ sleep 0.1 if Fluent.windows? # Wait for starting windows event thread
526
+ assert_not_nil(ENV['SERVERENGINE_SOCKETMANAGER_PATH'])
527
+ ensure
528
+ server.after_run
529
+ ENV.delete('SERVERENGINE_SOCKETMANAGER_PATH')
530
+ end
531
+ end
532
+
533
+ def test_disable_shared_socket
534
+ server = DummyServer.new
535
+ def server.config
536
+ {
537
+ :disable_shared_socket => true,
538
+ }
539
+ end
540
+ begin
541
+ ENV.delete('SERVERENGINE_SOCKETMANAGER_PATH')
542
+ server.before_run
543
+ sleep 0.1 if Fluent.windows? # Wait for starting windows event thread
544
+ assert_nil(ENV['SERVERENGINE_SOCKETMANAGER_PATH'])
545
+ ensure
546
+ server.after_run
547
+ ENV.delete('SERVERENGINE_SOCKETMANAGER_PATH')
548
+ end
549
+ end
550
+
520
551
  def create_debug_dummy_logger
521
552
  dl_opts = {}
522
553
  dl_opts[:log_level] = ServerEngine::DaemonLogger::DEBUG
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.12.1
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-05 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -388,40 +388,20 @@ dependencies:
388
388
  - - "<"
389
389
  - !ruby/object:Gem::Version
390
390
  version: '4'
391
- - !ruby/object:Gem::Dependency
392
- name: ext_monitor
393
- requirement: !ruby/object:Gem::Requirement
394
- requirements:
395
- - - ">="
396
- - !ruby/object:Gem::Version
397
- version: 0.1.2
398
- - - "<"
399
- - !ruby/object:Gem::Version
400
- version: '0.2'
401
- type: :development
402
- prerelease: false
403
- version_requirements: !ruby/object:Gem::Requirement
404
- requirements:
405
- - - ">="
406
- - !ruby/object:Gem::Version
407
- version: 0.1.2
408
- - - "<"
409
- - !ruby/object:Gem::Version
410
- version: '0.2'
411
391
  - !ruby/object:Gem::Dependency
412
392
  name: async-http
413
393
  requirement: !ruby/object:Gem::Requirement
414
394
  requirements:
415
395
  - - ">="
416
396
  - !ruby/object:Gem::Version
417
- version: '0'
397
+ version: 0.50.0
418
398
  type: :development
419
399
  prerelease: false
420
400
  version_requirements: !ruby/object:Gem::Requirement
421
401
  requirements:
422
402
  - - ">="
423
403
  - !ruby/object:Gem::Version
424
- version: '0'
404
+ version: 0.50.0
425
405
  description: Fluentd is an open source data collector designed to scale and simplify
426
406
  log management. It can collect, process and ship many kinds of data in near real-time.
427
407
  email:
@@ -446,6 +426,7 @@ files:
446
426
  - ".github/ISSUE_TEMPLATE/config.yml"
447
427
  - ".github/ISSUE_TEMPLATE/feature_request.md"
448
428
  - ".github/PULL_REQUEST_TEMPLATE.md"
429
+ - ".github/workflows/build.yaml"
449
430
  - ".github/workflows/issue-auto-closer.yml"
450
431
  - ".github/workflows/stale-actions.yml"
451
432
  - ".gitignore"
@@ -764,6 +745,7 @@ files:
764
745
  - templates/new_gem/test/plugin/test_output.rb.erb
765
746
  - templates/new_gem/test/plugin/test_parser.rb.erb
766
747
  - templates/plugin_config_formatter/param.md-compact.erb
748
+ - templates/plugin_config_formatter/param.md-table.erb
767
749
  - templates/plugin_config_formatter/param.md.erb
768
750
  - templates/plugin_config_formatter/section.md.erb
769
751
  - test/command/test_binlog_reader.rb
@@ -998,7 +980,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
998
980
  - !ruby/object:Gem::Version
999
981
  version: '0'
1000
982
  requirements: []
1001
- rubygems_version: 3.0.3
983
+ rubyforge_project:
984
+ rubygems_version: 2.7.6.2
1002
985
  signing_key:
1003
986
  specification_version: 4
1004
987
  summary: Fluentd event collector