fluentd 1.3.1 → 1.3.2

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: ab82be7292539aa23259062e0a5fb6fbe9d6a5ee
4
- data.tar.gz: f2114ce7960c197f57693e8c84e377cb2ee2edb4
3
+ metadata.gz: 5644a4291fc48ff7ee5d4ef95a8ec9cefd2bdf2c
4
+ data.tar.gz: d6d3f809d8417c2386cb886bd6b0690366ee2c19
5
5
  SHA512:
6
- metadata.gz: f4cffdc9ff288294bf1ed8f93dac35045f488309b8d303765fdce93434077e820f10c326f9af4437ba26b63b7f1c1636677b03c1514fa61c0a20dcb3d3f69361
7
- data.tar.gz: d7fa53ec4203b5b818d4bffea29102f295824c7120ce50217ec45d473f225e152647f6d0ed20049dd0e0a58f79e626012a48724620b203cb8b2aed54f27a06b5
6
+ metadata.gz: f6b0e70fc412893ed6855087aa976b01e5dad1d99c5529e840fdb4cdf1c70919466426932fb83e7e5756a88a85306a2fcbb7fab2da0eadd0f07e73d44820da85
7
+ data.tar.gz: da606d762f1e2b57acc31b5dcbdd508ae16c8034100eb4a20c3232b88a8ff19e0ff831dd935f3314a14a72497eb280ae1a713f62733e1ee5d3d85e941d083185
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # v1.3
2
2
 
3
+ ## Release v1.3.2 - 2018/12/10
4
+
5
+ ### Enhancements
6
+
7
+ * out_forward: Support mutual TLS
8
+ https://github.com/fluent/fluentd/pull/2187
9
+ * out_file: Create `pos_file` directory if it doesn't exist
10
+ https://github.com/fluent/fluentd/pull/2223
11
+
12
+ ### Bug fixes
13
+
14
+ * output: Fix logs during retry
15
+ https://github.com/fluent/fluentd/pull/2203
16
+
3
17
  ## Release v1.3.1 - 2018/11/27
4
18
 
5
19
  ### Enhancements
@@ -185,6 +185,8 @@ module Fluent::Plugin
185
185
  super
186
186
 
187
187
  if @pos_file
188
+ pos_file_dir = File.dirname(@pos_file)
189
+ FileUtils.mkdir_p(pos_file_dir) unless Dir.exist?(pos_file_dir)
188
190
  @pf_file = File.open(@pos_file, File::RDWR|File::CREAT|File::BINARY, @file_perm)
189
191
  @pf_file.sync = true
190
192
  @pf = PositionFile.parse(@pf_file)
@@ -946,7 +948,7 @@ module Fluent::Plugin
946
948
  @file = file
947
949
  @file_mutex = file_mutex
948
950
  @seek = seek
949
- @pos = pos
951
+ @pos = pos
950
952
  @inode = inode
951
953
  end
952
954
 
@@ -97,6 +97,12 @@ module Fluent::Plugin
97
97
  config_param :tls_ca_cert_path, :array, value_type: :string, default: nil
98
98
  desc 'The additional certificate path for TLS.'
99
99
  config_param :tls_cert_path, :array, value_type: :string, default: nil
100
+ desc 'The client certificate path for TLS.'
101
+ config_param :tls_client_cert_path, :string, default: nil
102
+ desc 'The client private key path for TLS.'
103
+ config_param :tls_client_private_key_path, :string, default: nil
104
+ desc 'The client private key passphrase for TLS.'
105
+ config_param :tls_client_private_key_passphrase, :string, default: nil
100
106
 
101
107
  config_section :security, required: false, multi: false do
102
108
  desc 'The hostname'
@@ -345,6 +351,9 @@ module Fluent::Plugin
345
351
  fqdn: hostname,
346
352
  allow_self_signed_cert: @tls_allow_self_signed_cert,
347
353
  cert_paths: @tls_ca_cert_path,
354
+ cert_path: @tls_client_cert_path,
355
+ private_key_path: @tls_client_private_key_path,
356
+ private_key_passphrase: @tls_client_private_key_passphrase,
348
357
  linger_timeout: @send_timeout,
349
358
  send_timeout: @send_timeout,
350
359
  recv_timeout: @ack_response_timeout,
@@ -1222,29 +1222,29 @@ module Fluent
1222
1222
 
1223
1223
  # @retry exists
1224
1224
 
1225
- if error
1226
- if @retry.limit?
1225
+ if @retry.limit?
1226
+ if error
1227
1227
  records = @buffer.queued_records
1228
1228
  msg = "failed to flush the buffer, and hit limit for retries. dropping all chunks in the buffer queue."
1229
1229
  log.error msg, retry_times: @retry.steps, records: records, error: error
1230
1230
  log.error_backtrace error.backtrace
1231
- elsif using_secondary
1232
- msg = "failed to flush the buffer with secondary output."
1233
- log.warn msg, retry_time: @retry.steps, next_retry_seconds: @retry.next_time, chunk: chunk_id_hex, error: error
1234
- log.warn_backtrace error.backtrace
1235
- else
1236
- msg = "failed to flush the buffer."
1237
- log.warn msg, retry_time: @retry.steps, next_retry_seconds: @retry.next_time, chunk: chunk_id_hex, error: error
1238
- log.warn_backtrace error.backtrace
1239
1231
  end
1240
- end
1241
-
1242
- if @retry.limit?
1243
1232
  @buffer.clear_queue!
1244
1233
  log.debug "buffer queue cleared"
1245
1234
  @retry = nil
1246
1235
  else
1247
1236
  @retry.step
1237
+ if error
1238
+ if using_secondary
1239
+ msg = "failed to flush the buffer with secondary output."
1240
+ log.warn msg, retry_time: @retry.steps, next_retry_seconds: @retry.next_time, chunk: chunk_id_hex, error: error
1241
+ log.warn_backtrace error.backtrace
1242
+ else
1243
+ msg = "failed to flush the buffer."
1244
+ log.warn msg, retry_time: @retry.steps, next_retry_seconds: @retry.next_time, chunk: chunk_id_hex, error: error
1245
+ log.warn_backtrace error.backtrace
1246
+ end
1247
+ end
1248
1248
  end
1249
1249
  end
1250
1250
  end
@@ -89,7 +89,8 @@ module Fluent
89
89
  def socket_create_tls(
90
90
  host, port,
91
91
  version: TLS_DEFAULT_VERSION, ciphers: CIPHERS_DEFAULT, insecure: false, verify_fqdn: true, fqdn: nil,
92
- enable_system_cert_store: true, allow_self_signed_cert: false, cert_paths: nil, **kwargs, &block)
92
+ enable_system_cert_store: true, allow_self_signed_cert: false, cert_paths: nil,
93
+ cert_path: nil, private_key_path: nil, private_key_passphrase: nil, **kwargs, &block)
93
94
 
94
95
  host_is_ipaddress = IPAddr.new(host) rescue false
95
96
  fqdn ||= host unless host_is_ipaddress
@@ -131,6 +132,8 @@ module Fluent
131
132
  context.verify_mode = OpenSSL::SSL::VERIFY_PEER
132
133
  context.cert_store = cert_store
133
134
  context.verify_hostname = true if verify_fqdn && fqdn && context.respond_to?(:verify_hostname=)
135
+ context.cert = OpenSSL::X509::Certificate.new(File.read(cert_path)) if cert_path
136
+ context.key = OpenSSL::PKey::RSA.new(File.read(private_key_path), private_key_passphrase) if private_key_path
134
137
  end
135
138
 
136
139
  tcpsock = socket_create_tcp(host, port, **kwargs)
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '1.3.1'
19
+ VERSION = '1.3.2'
20
20
 
21
21
  end
@@ -1011,6 +1011,25 @@ class TailInputTest < Test::Unit::TestCase
1011
1011
  end
1012
1012
  end
1013
1013
 
1014
+ def test_pos_file_dir_creation
1015
+ config = config_element("", "", {
1016
+ "tag" => "tail",
1017
+ "path" => "#{TMP_DIR}/*.txt",
1018
+ "format" => "none",
1019
+ "pos_file" => "#{TMP_DIR}/pos/tail.pos",
1020
+ "read_from_head" => true,
1021
+ "refresh_interval" => 1
1022
+ })
1023
+ d = create_driver(config, false)
1024
+ d.run(expect_emits: 1, shutdown: false) do
1025
+ File.open("#{TMP_DIR}/tail.txt", "ab") { |f| f.puts "test3\n" }
1026
+ end
1027
+ assert_path_exist("#{TMP_DIR}/pos/tail.pos")
1028
+ cleanup_directory(TMP_DIR)
1029
+
1030
+ d.instance_shutdown
1031
+ end
1032
+
1014
1033
  def test_z_refresh_watchers
1015
1034
  plugin = create_driver(EX_CONFIG, false).instance
1016
1035
  sio = StringIO.new
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.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-27 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack