fluentd 0.14.23 → 0.14.24

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
  SHA1:
3
- metadata.gz: 295a3c8dbe521b90ed22fcbc07ed1934d77325ad
4
- data.tar.gz: 57bcb6c43a76065fc9b3fd681a83f3a4aa2c0eae
3
+ metadata.gz: 3b8e3c3ad160e7b55045cc90693e4ed49e32e4d2
4
+ data.tar.gz: 0e0d26c585d8f9bd617050ce04936dc8a2d38095
5
5
  SHA512:
6
- metadata.gz: ff0029c699dbe57532351805e5d2cd4bc0d65d1635219b18eeddb019b1ff8845b71ac1029367024765b48f2971fa4f999fd7fa361329ecc4394b806651b539f4
7
- data.tar.gz: d7cb461f8f6cf8d65e088e1ea2db7aed60387280ac7b95c15b0220ee5e527f947cc0cecd9541162a81960f9dbce2393f26eddf4239745270763a59ad7303dbae
6
+ metadata.gz: 2a1790cd33c2c41176dd0452d918b979d21a5e7ac32f7730ad91d9b8c62404c095303d90f39bf69ea11dfac193bf733613e6926fc1aa7a73d8f6941f71c94bdb
7
+ data.tar.gz: 254bedd1088b57682cdbe0df7f547cad567702b6872d334c6cc82eb9d95c85f95a6c7537850bc0668a653ce73e4d69093861c482c45f459e9e49490a657521d7
@@ -1,5 +1,19 @@
1
1
  # v0.14
2
2
 
3
+ ## Release v0.14.24 - 2017/11/24
4
+
5
+ ### New features / Enhancements
6
+
7
+ * plugin-config-formatter: Add link to plugin helper result
8
+ https://github.com/fluent/fluentd/pull/1753
9
+ * server helper: Refactor code
10
+ https://github.com/fluent/fluentd/pull/1759
11
+
12
+ ### Bug fixes
13
+
14
+ * supervisor: Don't call change_privilege twice
15
+ https://github.com/fluent/fluentd/pull/1757
16
+
3
17
  ## Release v0.14.23 - 2017/11/15
4
18
 
5
19
  ### New features / Enhancements
@@ -73,7 +73,7 @@ op.on('--time-as-integer', "Send time as integer for v0.12 or earlier", TrueClas
73
73
  time_as_integer = true
74
74
  }
75
75
 
76
- (class << self; self; end).module_eval do
76
+ singleton_class.module_eval do
77
77
  define_method(:usage) do |msg|
78
78
  puts op.to_s
79
79
  puts "error: #{msg}" if msg
@@ -34,7 +34,7 @@ op.on('-u', '--unix PATH', "use unix socket instead of tcp") {|b|
34
34
  unix = b
35
35
  }
36
36
 
37
- (class << self; self; end).module_eval do
37
+ singleton_class.module_eval do
38
38
  define_method(:usage) do |msg|
39
39
  puts op.to_s
40
40
  puts "error: #{msg}" if msg
@@ -195,7 +195,7 @@ if Fluent.windows?
195
195
  end
196
196
 
197
197
 
198
- (class << self; self; end).module_eval do
198
+ singleton_class.module_eval do
199
199
  define_method(:usage) do |msg|
200
200
  puts op.to_s
201
201
  puts "error: #{msg}" if msg
@@ -31,6 +31,8 @@ class FluentPluginConfigFormatter
31
31
  "buffer", "parser", "formatter", "storage"
32
32
  ]
33
33
 
34
+ DOCS_BASE_URL = "https://docs.fluentd.org/v0.14/articles/"
35
+
34
36
  def initialize(argv = ARGV)
35
37
  @argv = argv
36
38
 
@@ -134,7 +136,7 @@ class FluentPluginConfigFormatter
134
136
  if plugin_helpers && !plugin_helpers.empty?
135
137
  dumped = "## Plugin helpers\n\n"
136
138
  plugin_helpers.each do |plugin_helper|
137
- dumped << "* #{plugin_helper}\n"
139
+ dumped << "* #{plugin_helper_markdown_link(plugin_helper)}\n"
138
140
  end
139
141
  dumped << "\n"
140
142
  end
@@ -143,7 +145,7 @@ class FluentPluginConfigFormatter
143
145
  dumped << "## #{name}\n\n"
144
146
  dumped << dump_section_markdown(config)
145
147
  else
146
- dumped << "* See also: #{name}\n\n"
148
+ dumped << "* See also: #{plugin_overview_markdown_link(name)}\n\n"
147
149
  end
148
150
  end
149
151
  dumped
@@ -181,6 +183,24 @@ class FluentPluginConfigFormatter
181
183
  end
182
184
  end
183
185
 
186
+ def plugin_helper_url(plugin_helper)
187
+ "#{DOCS_BASE_URL}api-plugin-helper-#{plugin_helper}"
188
+ end
189
+
190
+ def plugin_helper_markdown_link(plugin_helper)
191
+ "[#{plugin_helper}](#{plugin_helper_url(plugin_helper)})"
192
+ end
193
+
194
+ def plugin_overview_url(class_name)
195
+ plugin_type = class_name.slice(/::(\w+)\z/, 1).downcase
196
+ "#{DOCS_BASE_URL}#{plugin_type}-plugin-overview"
197
+ end
198
+
199
+ def plugin_overview_markdown_link(class_name)
200
+ plugin_type = class_name.slice(/::(\w+)\z/, 1)
201
+ "[#{plugin_type} Plugin Overview](#{plugin_overview_url(class_name)})"
202
+ end
203
+
184
204
  def usage(message = nil)
185
205
  puts @parser.to_s
186
206
  puts
@@ -156,8 +156,8 @@ module Fluent::Plugin
156
156
  delimiter = "\n"
157
157
  delimiter_size = delimiter.size
158
158
  server_create_connection(:in_syslog_tcp_server, @port, bind: @bind, resolve_name: @resolve_hostname) do |conn|
159
- buffer = ""
160
159
  conn.data do |data|
160
+ buffer = conn.buffer
161
161
  buffer << data
162
162
  pos = 0
163
163
  while idx = buffer.index(delimiter, pos)
@@ -146,7 +146,7 @@ module Fluent
146
146
  @u = Fluent::Engine.msgpack_factory.unpacker
147
147
  end
148
148
 
149
- (class << self; self; end).module_eval do
149
+ singleton_class.module_eval do
150
150
  define_method(:on_read, m)
151
151
  end
152
152
  m.call(data)
@@ -224,7 +224,7 @@ module Fluent
224
224
  end
225
225
  self.context_router = primary.context_router
226
226
 
227
- (class << self; self; end).module_eval do
227
+ singleton_class.module_eval do
228
228
  define_method(:commit_write){ |chunk_id| @primary_instance.commit_write(chunk_id, delayed: delayed_commit, secondary: true) }
229
229
  define_method(:rollback_write){ |chunk_id| @primary_instance.rollback_write(chunk_id) }
230
230
  end
@@ -389,7 +389,7 @@ module Fluent
389
389
 
390
390
  if @buffering
391
391
  m = method(:emit_buffered)
392
- (class << self; self; end).module_eval do
392
+ singleton_class.module_eval do
393
393
  define_method(:emit_events, m)
394
394
  end
395
395
 
@@ -403,7 +403,7 @@ module Fluent
403
403
  @delayed_commit_timeout = @buffer_config.delayed_commit_timeout
404
404
  else # !@buffering
405
405
  m = method(:emit_sync)
406
- (class << self; self; end).module_eval do
406
+ singleton_class.module_eval do
407
407
  define_method(:emit_events, m)
408
408
  end
409
409
  end
@@ -37,7 +37,7 @@ module Fluent
37
37
 
38
38
  # Call [] for single key to reduce dig overhead
39
39
  m = method(@keys.is_a?(Array) ? :call_dig : :call_index)
40
- (class << self; self; end).module_eval do
40
+ singleton_class.module_eval do
41
41
  define_method(:call, m)
42
42
  end
43
43
  end
@@ -370,6 +370,9 @@ module Fluent
370
370
  sock
371
371
  end
372
372
 
373
+ # Use string "?" for port, not integer or nil. "?" is clear than -1 or nil in the log.
374
+ PEERADDR_FAILED = ["?", "?", "name resolusion failed", "?"]
375
+
373
376
  class CallbackSocket
374
377
  def initialize(server_type, sock, enabled_events = [], close_socket: true)
375
378
  @server_type = server_type
@@ -425,11 +428,13 @@ module Fluent
425
428
  end
426
429
 
427
430
  class TCPCallbackSocket < CallbackSocket
431
+ ENABLED_EVENTS = [:data, :write_complete, :close]
432
+
428
433
  attr_accessor :buffer
429
434
 
430
435
  def initialize(sock)
431
- super("tcp", sock, [:data, :write_complete, :close])
432
- @peeraddr = @sock.peeraddr
436
+ super("tcp", sock, ENABLED_EVENTS)
437
+ @peeraddr = (@sock.peeraddr rescue PEERADDR_FAILED)
433
438
  @buffer = ''
434
439
  end
435
440
 
@@ -439,9 +444,11 @@ module Fluent
439
444
  end
440
445
 
441
446
  class TLSCallbackSocket < CallbackSocket
447
+ ENABLED_EVENTS = [:data, :write_complete, :close]
448
+
442
449
  def initialize(sock)
443
- super("tls", sock, [:data, :write_complete, :close])
444
- @peeraddr = @sock.to_io.peeraddr
450
+ super("tls", sock, ENABLED_EVENTS)
451
+ @peeraddr = (@sock.to_io.peeraddr rescue PEERADDR_FAILED)
445
452
  end
446
453
 
447
454
  def write(data)
@@ -450,8 +457,10 @@ module Fluent
450
457
  end
451
458
 
452
459
  class UDPCallbackSocket < CallbackSocket
460
+ ENABLED_EVENTS = []
461
+
453
462
  def initialize(sock, peeraddr, **kwargs)
454
- super("udp", sock, [], **kwargs)
463
+ super("udp", sock, ENABLED_EVENTS, **kwargs)
455
464
  @peeraddr = peeraddr
456
465
  end
457
466
 
@@ -517,7 +517,7 @@ module Fluent
517
517
 
518
518
  main_process do
519
519
  create_socket_manager if @standalone_worker
520
- change_privilege
520
+ change_privilege if @standalone_worker
521
521
  init_engine
522
522
  run_configure
523
523
  run_engine
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '0.14.23'
19
+ VERSION = '0.14.24'
20
20
 
21
21
  end
@@ -179,10 +179,10 @@ TEXT
179
179
  expected = <<TEXT
180
180
  ## Plugin helpers
181
181
 
182
- * inject
183
- * compat_parameters
182
+ * [inject](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-inject)
183
+ * [compat_parameters](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-compat_parameters)
184
184
 
185
- * See also: Fluent::Plugin::Input
185
+ * See also: [Input Plugin Overview](https://docs.fluentd.org/v0.14/articles/input-plugin-overview)
186
186
 
187
187
  ## TestFluentPluginConfigFormatter::SimpleInput
188
188
 
@@ -202,10 +202,10 @@ TEXT
202
202
  expected = <<TEXT
203
203
  ## Plugin helpers
204
204
 
205
- * inject
206
- * compat_parameters
205
+ * [inject](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-inject)
206
+ * [compat_parameters](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-compat_parameters)
207
207
 
208
- * See also: Fluent::Plugin::Output
208
+ * See also: [Output Plugin Overview](https://docs.fluentd.org/v0.14/articles/output-plugin-overview)
209
209
 
210
210
  ## TestFluentPluginConfigFormatter::ComplexOutput
211
211
 
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: 0.14.23
4
+ version: 0.14.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-15 00:00:00.000000000 Z
11
+ date: 2017-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack