fluentd 1.5.1-x86-mingw32 → 1.5.2-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: 5f3afbf08a40686033bdeb716d0e138d9dfbac96138ef64f8b0ee52449228634
4
- data.tar.gz: 94e92a0dd777ea310249bb375169a66814054e196bed9473b4242b73c2248ca1
3
+ metadata.gz: 93fc2c158f80c62d6eb81619ef23f111990f01c0bbb6bbd5b29709664568d655
4
+ data.tar.gz: 0dd4e5415dd3b328164cf54bed5d306a4b09b2fc537faace0f8f51a4e63c2b2d
5
5
  SHA512:
6
- metadata.gz: 87f10d3fff183d7f7cdc99c5c4f0bc7d8c9670272de88d23d51390055ab69967fa447f069d983ef1f86b4d054306fa422e13708c144fed0003a10c96537c1470
7
- data.tar.gz: bf63050578d0e3b86b2d92994e98857a863f4fee82bd8a11039c8d24a5104bf4ea8b9bee8e6ff7ec32c65443ccfd8eb6b2f97be9d3a89cf29f7e696dc7d70d29
6
+ metadata.gz: 267d5487dfc88c241d13f12391feeed749849c94ef34639c0a665beef449041a7707f7ef51d7c2552f5f5ce4507e0e244ea84056ee790072d93ea517048bcb2d
7
+ data.tar.gz: 9d9a19a151340ddd54b65fc1d9bef401303adc4ed30568b71dac4f5333cd401d6c823703c1618c903cedac3afa5f105f6cefb592cce7a4d2cf5ea6606190aff3
@@ -1,5 +1,12 @@
1
1
  # v1.5
2
2
 
3
+ ## Release v1.5.2 - 2019/06/13
4
+
5
+ ### Bug fixes
6
+
7
+ * out_forward: Fix duplicated handshake bug in keepalive
8
+ https://github.com/fluent/fluentd/pull/2456
9
+
3
10
  ## Release v1.5.1 - 2019/06/05
4
11
 
5
12
  ### Enhancement
@@ -770,8 +770,7 @@ module Fluent::Plugin
770
770
  end
771
771
 
772
772
  def verify_connection
773
- connect do |sock|
774
- ri = RequestInfo.new(@sender.security ? :helo : :established)
773
+ connect do |sock, ri|
775
774
  if ri.state != :established
776
775
  establish_connection(sock, ri)
777
776
  raise if ri.state != :established
@@ -810,11 +809,6 @@ module Fluent::Plugin
810
809
  end
811
810
 
812
811
  def send_data_actual(sock, tag, chunk)
813
- ri = RequestInfo.new(@sender.security ? :helo : :established)
814
- if ri.state != :established
815
- establish_connection(sock, ri)
816
- end
817
-
818
812
  unless available?
819
813
  raise ConnectionClosedError, "failed to establish connection with node #{@name}"
820
814
  end
@@ -841,7 +835,10 @@ module Fluent::Plugin
841
835
  end
842
836
 
843
837
  def send_data(tag, chunk)
844
- sock = connect
838
+ sock, ri = connect
839
+ if ri.state != :established
840
+ establish_connection(sock, ri)
841
+ end
845
842
 
846
843
  begin
847
844
  send_data_actual(sock, tag, chunk)
@@ -1073,26 +1070,36 @@ module Fluent::Plugin
1073
1070
  private
1074
1071
 
1075
1072
  def connect(host = nil)
1076
- sock = if @keepalive
1077
- @socket_cache.fetch_or { @sender.create_transfer_socket(host || resolved_host, port, @hostname) }
1078
- else
1079
- @log.debug('connect new socket')
1080
- @sender.create_transfer_socket(host || resolved_host, port, @hostname)
1081
- end
1073
+ socket, request_info =
1074
+ if @keepalive
1075
+ ri = RequestInfo.new(:established)
1076
+ sock = @socket_cache.fetch_or do
1077
+ s = @sender.create_transfer_socket(host || resolved_host, port, @hostname)
1078
+ ri = RequestInfo.new(@sender.security ? :helo : :established) # overwrite if new connection
1079
+ s
1080
+ end
1081
+ [sock, ri]
1082
+ else
1083
+ @log.debug('connect new socket')
1084
+ [@sender.create_transfer_socket(host || resolved_host, port, @hostname), RequestInfo.new(@sender.security ? :helo : :established)]
1085
+ end
1082
1086
 
1083
1087
  if block_given?
1088
+ ret = nil
1084
1089
  begin
1085
- yield(sock)
1090
+ ret = yield(socket, request_info)
1086
1091
  rescue
1087
1092
  @socket_cache.revoke if @keepalive
1088
1093
  raise
1089
1094
  else
1090
1095
  @socket_cache.dec_ref if @keepalive
1091
1096
  ensure
1092
- sock.close unless @keepalive
1097
+ socket.close unless @keepalive
1093
1098
  end
1099
+
1100
+ ret
1094
1101
  else
1095
- sock
1102
+ [socket, request_info]
1096
1103
  end
1097
1104
  end
1098
1105
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '1.5.1'
19
+ VERSION = '1.5.2'
20
20
 
21
21
  end
@@ -649,7 +649,55 @@ EOL
649
649
  assert_equal(['test', time, records[1]], events[1])
650
650
  end
651
651
 
652
- test 'authentication_with_user_auth' do
652
+ test 'keepalive + shared_key' do
653
+ input_conf = TARGET_CONFIG + %[
654
+ <security>
655
+ self_hostname in.localhost
656
+ shared_key fluentd-sharedkey
657
+ </security>
658
+ ]
659
+ target_input_driver = create_target_input_driver(conf: input_conf)
660
+
661
+ output_conf = %[
662
+ send_timeout 51
663
+ keepalive true
664
+ <security>
665
+ self_hostname localhost
666
+ shared_key fluentd-sharedkey
667
+ </security>
668
+ <server>
669
+ name test
670
+ host #{TARGET_HOST}
671
+ port #{TARGET_PORT}
672
+ </server>
673
+ ]
674
+ @d = d = create_driver(output_conf)
675
+
676
+ time = event_time('2011-01-02 13:14:15 UTC')
677
+ records = [{ 'a' => 1 }, { 'a' => 2 }]
678
+ records2 = [{ 'b' => 1}, { 'b' => 2}]
679
+ target_input_driver.run(expect_records: 4, timeout: 15) do
680
+ d.run(default_tag: 'test') do
681
+ records.each do |record|
682
+ d.feed(time, record)
683
+ end
684
+
685
+ d.flush # emit buffer to reuse same socket later
686
+ records2.each do |record|
687
+ d.feed(time, record)
688
+ end
689
+ end
690
+ end
691
+
692
+ events = target_input_driver.events
693
+ assert{ events != [] }
694
+ assert_equal(['test', time, records[0]], events[0])
695
+ assert_equal(['test', time, records[1]], events[1])
696
+ assert_equal(['test', time, records2[0]], events[2])
697
+ assert_equal(['test', time, records2[1]], events[3])
698
+ end
699
+
700
+ test 'authentication_with_user_auth' do
653
701
  input_conf = TARGET_CONFIG + %[
654
702
  <security>
655
703
  self_hostname in.localhost
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.5.1
4
+ version: 1.5.2
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: 2019-06-05 00:00:00.000000000 Z
11
+ date: 2019-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack