fluentd 1.4.0 → 1.4.1

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: ca1f6da9527b76b4421c1507ec0e2702687e196d
4
- data.tar.gz: 8ae3c1fbac074dbc699bb36cb0975c78e94e3769
3
+ metadata.gz: b5edf62d55c4f1fbdadda5a367479cdf5b875f3b
4
+ data.tar.gz: e931a66ae995f73c3309ab9fcf29d2a8e36ef0c8
5
5
  SHA512:
6
- metadata.gz: 4a2298e9e76277c4ce41c7b43e239643a0b3ad8a953ab47bc242a9e22645e0d517853f73f8e37699ad5bbc57dc36e9d5cfb0504da155fb575c36eebf1893cfb7
7
- data.tar.gz: 783fb04e180adc4711a6ebf83b91d6fa2d318300ca31ba0c49c8d247c2eceed4992b22be98765f7b30e316cd7815cf9aac7e81873b221c480f4df80f51a3fccb
6
+ metadata.gz: 6c1e49998c72cb8a4d491e355095804167a86dd9a26b391d1d6188c51976ae30c77d28b43c0433e57b83e8a1c4503bc248fce0cbe4b98d079ba795414f6c33ca
7
+ data.tar.gz: ec39e3c4c5dafab999a61799a003ab170bf08df076dc1a98ad5c32910e3dc6e4a6aef5d83182b44e7f3cc2621b06a6e3e8333179a62ae466aa5b940ff8ded2d0
@@ -0,0 +1,13 @@
1
+ <!--
2
+ Thank you for contributing to Fluentd!
3
+ Please provide the following information to help us make the most of your pull request:
4
+ -->
5
+
6
+ **Which issue(s) this PR fixes**:
7
+ Fixes #
8
+
9
+ **What this PR does / why we need it**:
10
+
11
+ **Docs Changes**:
12
+
13
+ **Release Note**:
data/.gitignore CHANGED
@@ -25,4 +25,5 @@ Gemfile.local
25
25
  coverage/*
26
26
  .vagrant/
27
27
  cov-int/
28
- cov-fluentd.tar.gz
28
+ cov-fluentd.tar.gz
29
+ .vscode
@@ -1,4 +1,20 @@
1
- # v1.3
1
+ # v1.4
2
+
3
+ ## Release v1.4.1 - 2019/03/18
4
+
5
+ ### Enhancements
6
+
7
+ * system: Add worker_id to process_name when workers is larger than 1
8
+ https://github.com/fluent/fluentd/pull/2321
9
+ * in_syslog: Check message length when read from buffer in octet counting
10
+ https://github.com/fluent/fluentd/pull/2323
11
+ * parser_regexp: Check named captures. When no named captures, configuration error is raised
12
+ https://github.com/fluent/fluentd/pull/2331
13
+
14
+ ### Bug fixes
15
+
16
+ * out_forward: Make tls_client_private_key_passphrase secret
17
+ https://github.com/fluent/fluentd/pull/2324
2
18
 
3
19
  ## Release v1.4.0 - 2019/02/24
4
20
 
@@ -15,10 +31,10 @@
15
31
 
16
32
  * output: Add MessagePack unpacker error to unrecoverable error list
17
33
  https://github.com/fluent/fluentd/pull/2301
18
- * output: Reduce flush deley when large timekey and small timekey_wait are specified
34
+ * output: Reduce flush delay when large timekey and small timekey_wait are specified
19
35
  https://github.com/fluent/fluentd/pull/2291
20
36
  * config: Support embedded ruby code in section argument.
21
- https://github.com/fluent/fluentd/pull/2291
37
+ https://github.com/fluent/fluentd/pull/2295
22
38
  * in_tail: Improve encoding parameter handling
23
39
  https://github.com/fluent/fluentd/pull/2305
24
40
  * in_tcp/in_udp: Add <parse> section check
@@ -31,6 +47,8 @@
31
47
  * server: Ignore EPIPE in TLS accept to avoid fluentd restart
32
48
  https://github.com/fluent/fluentd/pull/2253
33
49
 
50
+ # v1.3
51
+
34
52
  ## Release v1.3.3 - 2019/01/06
35
53
 
36
54
  ### Enhancements
@@ -673,12 +691,12 @@ See [CNCF announcment](https://www.cncf.io/blog/2017/12/06/fluentd-v1-0/) :)
673
691
 
674
692
  * output: Secondary calculation should consider 'retry_max_times'
675
693
  https://github.com/fluent/fluentd/pull/1452
676
- * Fix regression of deprecatd 'process' module
694
+ * Fix regression of deprecated 'process' module
677
695
  https://github.com/fluent/fluentd/pull/1443
678
696
  * Fix missing parser_regex require
679
697
  https://github.com/fluent/fluentd/issues/1458
680
698
  https://github.com/fluent/fluentd/pull/1453
681
- * Keep 'Fluent::BufferQueueLimitError' for exsting plugins
699
+ * Keep 'Fluent::BufferQueueLimitError' for existing plugins
682
700
  https://github.com/fluent/fluentd/pull/1456
683
701
  * in_tail: Untracked files should be removed from watching list to avoid memory bloat
684
702
  https://github.com/fluent/fluentd/pull/1467
@@ -930,7 +948,7 @@ See [CNCF announcment](https://www.cncf.io/blog/2017/12/06/fluentd-v1-0/) :)
930
948
 
931
949
  ### Bug fixes
932
950
 
933
- * Raise configuration errors to clearify what's wrong when "@type" is missing
951
+ * Raise configuration errors to clarify what's wrong when "@type" is missing
934
952
  https://github.com/fluent/fluentd/pull/1202
935
953
  * Fix the bug not to launch Fluentd when v0.12 MultiOutput plugin is configured
936
954
  https://github.com/fluent/fluentd/pull/1206
@@ -0,0 +1,78 @@
1
+ # Github workflow for contributing to fluentd
2
+
3
+ Table of Contents
4
+
5
+ * [Fork a repository](#fork-a-repository)
6
+ * [Clone fork repository to local](#clone-fork-repository-to-local)
7
+ * [Create a branch to add a new feature or fix issues](#create-a-branch-to-add-a-new-feature-or-fix-issues)
8
+ * [Commit and Push](#commit-and-push)
9
+ * [Create a Pull Request](#create-a-pull-request)
10
+
11
+
12
+ The [fluentd](https://github.com/fluent/fluentd.git) code is hosted on Github (https://github.com/fluent/fluentd). The repository is called `upstream`. Contributors will develop and commit their changes in a clone of upstream repository. Then contributors push their change to their forked repository (`origin`) and create a Pull Request (PR), the PR will be merged to `upstream` repository if it meets the all the necessary requirements.
13
+
14
+ ## Fork a repository
15
+
16
+ Go to https://github.com/fluent/fluentd then hit the `Fork` button to fork your own copy of repository **fluentd** to your github account.
17
+
18
+ ## Clone the forked repository to local
19
+
20
+ Clone the forked repo in [above step](#fork-a-repository) to your local working directory:
21
+ ```sh
22
+ $ git clone https://github.com/$your_github_account/fluentd.git
23
+ ```
24
+
25
+ Keep your fork in sync with the main repo, add an `upstream` remote:
26
+ ```sh
27
+ $ cd fluentd
28
+ $ git remote add upstream https://github.com/fluentd/fluentd.git
29
+ $ git remote -v
30
+
31
+ origin https://github.com/$your_github_account/fluentd.git (fetch)
32
+ origin https://github.com/$your_github_account/fluentd.git (push)
33
+ upstream https://github.com/fluentd/fluentd.git (fetch)
34
+ upstream https://github.com/fluentd/fluentd.git (push)
35
+ ```
36
+
37
+ Sync your local `master` branch:
38
+ ```sh
39
+ $ git checkout master
40
+ $ git pull origin master
41
+ $ git fetch upstream
42
+ $ git rebase upstream/master
43
+ ```
44
+
45
+ ## Create a branch to add a new feature or fix issues
46
+
47
+ Before making any change, create a new branch:
48
+ ```sh
49
+ $ git checkout master
50
+ $ git pull upstream master
51
+ $ git checkout -b new-feature
52
+ ```
53
+
54
+ ## Commit and Push
55
+
56
+ Make any change on the branch `new-feature` then build and test your codes.
57
+ Include in what will be committed:
58
+ ```sh
59
+ $ git add <file>
60
+ ```
61
+
62
+ Commit your changes with `sign-offs`
63
+ ```sh
64
+ $ git commit -s
65
+ ```
66
+
67
+ Enter your commit message to describe the changes. See the tips for a good commit message at [here](https://chris.beams.io/posts/git-commit/).
68
+ Likely you go back and edit/build/test some more then `git commit --amend`
69
+
70
+ Push your branch `new-feature` to your forked repository:
71
+ ```sh
72
+ $ git push -u origin new-feature
73
+ ```
74
+
75
+ ## Create a Pull Request
76
+
77
+ * Go to your fork at https://github.com/$your_github_account/fluentd
78
+ * Create a Pull Request from the branch you recently pushed by hitting the button `Compare & pull request` next to branch name.
data/README.md CHANGED
@@ -71,7 +71,7 @@ Many enterprises run Fluentd in production to handle all of their logging needs.
71
71
  - Project repository: https://github.com/fluent
72
72
  - Discussion: https://groups.google.com/group/fluentd
73
73
  - Slack / Community: https://slack.fluentd.org
74
- - Newsletters: https://www.fluentd.org/newsletter_signup
74
+ - Newsletters: https://www.fluentd.org/newsletter
75
75
  - Author: [Sadayuki Furuhashi](https://github.com/frsyuki)
76
76
  - Copyright: 2011-2018 Fluentd Authors
77
77
  - License: Apache License, Version 2.0
@@ -32,7 +32,8 @@ class FluentPluginConfigFormatter
32
32
  "buffer", "parser", "formatter", "storage"
33
33
  ]
34
34
 
35
- DOCS_BASE_URL = "https://docs.fluentd.org/v1.0/articles/"
35
+ DOCS_BASE_URL = "https://docs.fluentd.org/v1.0/articles/quickstart"
36
+ DOCS_ARTICLE_BASE_URL = "https://docs.fluentd.org/v1.0/articles/"
36
37
 
37
38
  def initialize(argv = ARGV)
38
39
  @argv = argv
@@ -185,7 +186,7 @@ class FluentPluginConfigFormatter
185
186
  end
186
187
 
187
188
  def plugin_helper_url(plugin_helper)
188
- "#{DOCS_BASE_URL}api-plugin-helper-#{plugin_helper}"
189
+ "#{DOCS_ARTICLE_BASE_URL}api-plugin-helper-#{plugin_helper}"
189
190
  end
190
191
 
191
192
  def plugin_helper_markdown_link(plugin_helper)
@@ -194,7 +195,7 @@ class FluentPluginConfigFormatter
194
195
 
195
196
  def plugin_overview_url(class_name)
196
197
  plugin_type = class_name.slice(/::(\w+)\z/, 1).downcase
197
- "#{DOCS_BASE_URL}#{plugin_type}-plugin-overview"
198
+ "#{DOCS_ARTICLE_BASE_URL}#{plugin_type}-plugin-overview"
198
199
  end
199
200
 
200
201
  def plugin_overview_markdown_link(class_name)
@@ -288,7 +288,7 @@ module Fluent
288
288
  def join
289
289
  until @set
290
290
  @mutex.synchronize do
291
- @loop.run_once(0.0001) # retun a lock as soon as possible
291
+ @loop.run_once(0.0001) # return a lock as soon as possible
292
292
  end
293
293
  end
294
294
  end
@@ -44,7 +44,7 @@ module Fluent
44
44
  # check compressed_data(String) is 0 length
45
45
  compressed_data
46
46
  when output_io
47
- # exeucte after checking compressed_data is empty or not
47
+ # execute after checking compressed_data is empty or not
48
48
  io = StringIO.new(compressed_data)
49
49
  io_decompress(io, output_io)
50
50
  else
@@ -169,6 +169,10 @@ module Fluent::Plugin
169
169
  num = Integer(buffer[pos..idx])
170
170
  pos = idx + num
171
171
  msg = buffer[idx + 1...pos]
172
+ if msg.size < num - 1
173
+ pos = pos - num - num.to_s.size
174
+ break
175
+ end
172
176
  message_handler(msg, conn)
173
177
  end
174
178
  else
@@ -102,7 +102,7 @@ module Fluent::Plugin
102
102
  desc 'The client private key path for TLS.'
103
103
  config_param :tls_client_private_key_path, :string, default: nil
104
104
  desc 'The client private key passphrase for TLS.'
105
- config_param :tls_client_private_key_passphrase, :string, default: nil
105
+ config_param :tls_client_private_key_passphrase, :string, default: nil, secret: true
106
106
 
107
107
  config_section :security, required: false, multi: false do
108
108
  desc 'The hostname'
@@ -40,6 +40,10 @@ module Fluent
40
40
  @expression = Regexp.compile(@expression.source, options)
41
41
  end
42
42
  @regexp = @expression # For backward compatibility
43
+
44
+ if @expression.named_captures.empty?
45
+ raise Fluent::ConfigError, "No named captures in 'expression' parameter. The regexp must have at least one named capture"
46
+ end
43
47
  end
44
48
 
45
49
  def parse(text)
@@ -716,7 +716,13 @@ module Fluent
716
716
  end
717
717
 
718
718
  def main_process(&block)
719
- Process.setproctitle("worker:#{@process_name}") if @process_name
719
+ if @process_name
720
+ if @workers > 1
721
+ Process.setproctitle("worker:#{@process_name}#{ENV['SERVERENGINE_WORKER_ID']}")
722
+ else
723
+ Process.setproctitle("worker:#{@process_name}")
724
+ end
725
+ end
720
726
 
721
727
  unrecoverable_error = false
722
728
 
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '1.4.0'
19
+ VERSION = '1.4.1'
20
20
 
21
21
  end
@@ -84,7 +84,7 @@ class TextParserTest < ::Test::Unit::TestCase
84
84
  multiline: Regexp::MULTILINE,
85
85
  both: Regexp::IGNORECASE & Regexp::MULTILINE)
86
86
  def test_regexp_parser_config(options)
87
- source = "a"
87
+ source = "(?<test>.*)"
88
88
  parser = Fluent::TextParser::RegexpParser.new(Regexp.new(source, options), { "dummy" => "dummy" })
89
89
  regexp = parser.instance_variable_get("@regexp")
90
90
  assert_equal(options, regexp.options)
@@ -153,6 +153,15 @@ class RegexpParserTest < ::Test::Unit::TestCase
153
153
  end
154
154
 
155
155
  sub_test_case "configure" do
156
+ def test_bad_expression
157
+ conf = {
158
+ 'expression' => %q!/.*/!,
159
+ }
160
+ assert_raise Fluent::ConfigError do
161
+ create_driver(conf)
162
+ end
163
+ end
164
+
156
165
  def test_default_options
157
166
  conf = {
158
167
  'expression' => %q!/^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] \[(?<date>[^\]]*)\] "(?<flag>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*)$/!,
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.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -329,6 +329,7 @@ extensions: []
329
329
  extra_rdoc_files: []
330
330
  files:
331
331
  - ".github/ISSUE_TEMPLATE.md"
332
+ - ".github/PULL_REQUEST_TEMPLATE.md"
332
333
  - ".gitignore"
333
334
  - ".travis.yml"
334
335
  - ADOPTERS.md
@@ -337,6 +338,7 @@ files:
337
338
  - CONTRIBUTING.md
338
339
  - GOVERNANCE.md
339
340
  - Gemfile
341
+ - GithubWorkflow.md
340
342
  - LICENSE
341
343
  - MAINTAINERS.md
342
344
  - README.md