fluentd 0.12.38 → 0.12.39
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 +4 -4
- data/ChangeLog +8 -0
- data/lib/fluent/agent.rb +2 -50
- data/lib/fluent/engine.rb +6 -9
- data/lib/fluent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 457250d0787e77f19de0da31390b5f6f597fad12
|
4
|
+
data.tar.gz: c41f52a94f1c1a4728dd3721b32978850dd28a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 147e84086641e3651908789e80ad9cac70c3cd0a4dc5d0a70128bdc9e670724b4ba80a01a58abdaa5a66aca4aadbe1eba95e2d267e21d62c79317585faddb5f9
|
7
|
+
data.tar.gz: b51d04dea05b51b558c89d703ada04f1c431874b16dcfcfaaf0e8e84e7b0a51c3f8873d7d1580cd0cccc7a2f108a5fb44bdae45eb662e5227f7ff8fa31ee7076
|
data/ChangeLog
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# v0.12
|
2
2
|
|
3
|
+
## Release 0.12.39 - 2017/07/14
|
4
|
+
|
5
|
+
### Bug fixes
|
6
|
+
|
7
|
+
* log: Revert 0.12.38 changes to avoid shutdown stuck
|
8
|
+
https://github.com/fluent/fluentd/pull/1631
|
9
|
+
https://github.com/fluent/fluentd/pull/1632
|
10
|
+
|
3
11
|
## Release 0.12.38 - 2017/07/13
|
4
12
|
|
5
13
|
### New features / Enhancement
|
data/lib/fluent/agent.rb
CHANGED
@@ -38,11 +38,6 @@ module Fluent
|
|
38
38
|
@started_outputs = []
|
39
39
|
@started_filters = []
|
40
40
|
|
41
|
-
@outputs_for_log_event = []
|
42
|
-
@filters_for_log_event = []
|
43
|
-
@started_outputs_for_log_event = []
|
44
|
-
@started_filters_for_log_event = []
|
45
|
-
|
46
41
|
@log = Engine.log
|
47
42
|
@event_router = EventRouter.new(NoMatchMatch.new(log), self)
|
48
43
|
@error_collector = nil
|
@@ -75,47 +70,16 @@ module Fluent
|
|
75
70
|
@outputs.each { |o|
|
76
71
|
o.start
|
77
72
|
@started_outputs << o
|
78
|
-
@started_outputs_for_log_event << o if @outputs_for_log_event.include?(o)
|
79
73
|
}
|
80
74
|
|
81
75
|
@filters.each { |f|
|
82
76
|
f.start
|
83
77
|
@started_filters << f
|
84
|
-
@started_filters_for_log_event << f if @filters_for_log_event.include?(f)
|
85
78
|
}
|
86
79
|
end
|
87
80
|
|
88
81
|
def shutdown
|
89
|
-
|
90
|
-
Thread.new do
|
91
|
-
begin
|
92
|
-
log.info "shutting down filter#{@context.nil? ? '' : " in #{@context}"}", type: Plugin.lookup_name_from_class(f.class), plugin_id: f.plugin_id
|
93
|
-
f.shutdown
|
94
|
-
rescue => e
|
95
|
-
log.warn "unexpected error while shutting down filter plugins", plugin: f.class, plugin_id: f.plugin_id, error_class: e.class, error: e
|
96
|
-
log.warn_backtrace
|
97
|
-
end
|
98
|
-
end
|
99
|
-
}.each { |t| t.join }
|
100
|
-
|
101
|
-
# Output plugin as filter emits records at shutdown so emit problem still exist.
|
102
|
-
# This problem will be resolved after actual filter mechanizm.
|
103
|
-
(@started_outputs - @started_outputs_for_log_event).map { |o|
|
104
|
-
Thread.new do
|
105
|
-
begin
|
106
|
-
log.info "shutting down output#{@context.nil? ? '' : " in #{@context}"}", type: Plugin.lookup_name_from_class(o.class), plugin_id: o.plugin_id
|
107
|
-
o.shutdown
|
108
|
-
rescue => e
|
109
|
-
log.warn "unexpected error while shutting down output plugins", plugin: o.class, plugin_id: o.plugin_id, error_class: e.class, error: e
|
110
|
-
log.warn_backtrace
|
111
|
-
end
|
112
|
-
end
|
113
|
-
}.each { |t| t.join }
|
114
|
-
|
115
|
-
## execute callback from Engine to flush log event queue before shutting down corresponding filters and outputs
|
116
|
-
yield if block_given?
|
117
|
-
|
118
|
-
@started_filters_for_log_event.map { |f|
|
82
|
+
@started_filters.map { |f|
|
119
83
|
Thread.new do
|
120
84
|
begin
|
121
85
|
log.info "shutting down filter#{@context.nil? ? '' : " in #{@context}"}", type: Plugin.lookup_name_from_class(f.class), plugin_id: f.plugin_id
|
@@ -129,7 +93,7 @@ module Fluent
|
|
129
93
|
|
130
94
|
# Output plugin as filter emits records at shutdown so emit problem still exist.
|
131
95
|
# This problem will be resolved after actual filter mechanizm.
|
132
|
-
@
|
96
|
+
@started_outputs.map { |o|
|
133
97
|
Thread.new do
|
134
98
|
begin
|
135
99
|
log.info "shutting down output#{@context.nil? ? '' : " in #{@context}"}", type: Plugin.lookup_name_from_class(o.class), plugin_id: o.plugin_id
|
@@ -170,10 +134,6 @@ module Fluent
|
|
170
134
|
@outputs << output
|
171
135
|
@event_router.add_rule(pattern, output)
|
172
136
|
|
173
|
-
if match_event_log_tag?(pattern)
|
174
|
-
@outputs_for_log_event << output
|
175
|
-
end
|
176
|
-
|
177
137
|
output
|
178
138
|
end
|
179
139
|
|
@@ -186,17 +146,9 @@ module Fluent
|
|
186
146
|
@filters << filter
|
187
147
|
@event_router.add_rule(pattern, filter)
|
188
148
|
|
189
|
-
if match_event_log_tag?(pattern)
|
190
|
-
@filters_for_log_event << filter
|
191
|
-
end
|
192
|
-
|
193
149
|
filter
|
194
150
|
end
|
195
151
|
|
196
|
-
def match_event_log_tag?(pattern)
|
197
|
-
EventRouter::Rule.new(pattern, nil).match?($log.tag)
|
198
|
-
end
|
199
|
-
|
200
152
|
# For handling invalid record
|
201
153
|
def emit_error_event(tag, time, record, error)
|
202
154
|
end
|
data/lib/fluent/engine.rb
CHANGED
@@ -165,6 +165,7 @@ module Fluent
|
|
165
165
|
$log.disable_events(Thread.current)
|
166
166
|
|
167
167
|
while sleep(LOG_EMIT_INTERVAL)
|
168
|
+
break if @log_event_loop_stop
|
168
169
|
next if @log_event_queue.empty?
|
169
170
|
|
170
171
|
# NOTE: thead-safe of slice! depends on GVL
|
@@ -178,7 +179,6 @@ module Fluent
|
|
178
179
|
$log.error "failed to emit fluentd's log event", tag: tag, event: record, error_class: e.class, error: e
|
179
180
|
end
|
180
181
|
}
|
181
|
-
break if @log_event_loop_stop
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
@@ -209,13 +209,10 @@ module Fluent
|
|
209
209
|
$log.error_backtrace
|
210
210
|
ensure
|
211
211
|
$log.info "shutting down fluentd"
|
212
|
+
shutdown
|
212
213
|
if @log_emit_thread
|
213
|
-
|
214
|
-
|
215
|
-
@log_emit_thread.join
|
216
|
-
end
|
217
|
-
else
|
218
|
-
shutdown
|
214
|
+
@log_event_loop_stop = true
|
215
|
+
@log_emit_thread.join
|
219
216
|
end
|
220
217
|
end
|
221
218
|
end
|
@@ -240,8 +237,8 @@ module Fluent
|
|
240
237
|
@root_agent.start
|
241
238
|
end
|
242
239
|
|
243
|
-
def shutdown
|
244
|
-
@root_agent.shutdown
|
240
|
+
def shutdown
|
241
|
+
@root_agent.shutdown
|
245
242
|
end
|
246
243
|
end
|
247
244
|
|
data/lib/fluent/version.rb
CHANGED
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.12.
|
4
|
+
version: 0.12.39
|
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-07-
|
11
|
+
date: 2017-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|