fluentd 0.10.35 → 0.10.36

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.

@@ -68,6 +68,7 @@ class Supervisor
68
68
  @plugin_dirs = opt[:plugin_dirs]
69
69
  @inline_config = opt[:inline_config]
70
70
  @suppress_interval = opt[:suppress_interval]
71
+ @dry_run = opt[:dry_run]
71
72
 
72
73
  @log = LoggerInitializer.new(@log_path, @log_level, @chuser, @chgroup)
73
74
  @finished = false
@@ -78,6 +79,7 @@ class Supervisor
78
79
  require 'fluent/load'
79
80
  @log.init
80
81
 
82
+ dry_run if @dry_run
81
83
  start_daemonize if @daemonize
82
84
  install_supervisor_signal_handlers
83
85
  until @finished
@@ -96,6 +98,19 @@ class Supervisor
96
98
  end
97
99
 
98
100
  private
101
+
102
+ def dry_run
103
+ read_config
104
+ change_privilege
105
+ init_engine
106
+ install_main_process_signal_handlers
107
+ run_configure
108
+ exit 0
109
+ rescue => e
110
+ $log.error "Dry run failed: #{e}"
111
+ exit 1
112
+ end
113
+
99
114
  def start_daemonize
100
115
  @wait_daemonize_pipe_r, @wait_daemonize_pipe_w = IO.pipe
101
116
 
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
 
3
- VERSION = '0.10.35'
3
+ VERSION = '0.10.36'
4
4
 
5
5
  end
@@ -134,6 +134,7 @@ class UnixInputTest < Test::Unit::TestCase
134
134
 
135
135
  CONFIG = %[
136
136
  path #{TMP_DIR}/unix
137
+ backlog 1000
137
138
  ]
138
139
 
139
140
  def create_driver(conf=CONFIG)
@@ -143,6 +144,7 @@ class UnixInputTest < Test::Unit::TestCase
143
144
  def test_configure
144
145
  d = create_driver
145
146
  assert_equal "#{TMP_DIR}/unix", d.instance.path
147
+ assert_equal 1000, d.instance.backlog
146
148
  end
147
149
 
148
150
  def connect
@@ -9,7 +9,8 @@ class FileOutputTest < Test::Unit::TestCase
9
9
  FileUtils.mkdir_p(TMP_DIR)
10
10
  end
11
11
 
12
- TMP_DIR = File.dirname(__FILE__) + "/../tmp"
12
+ TMP_DIR = File.expand_path(File.dirname(__FILE__) + "/../tmp")
13
+ SYMLINK_PATH = File.expand_path("#{TMP_DIR}/current")
13
14
 
14
15
  CONFIG = %[
15
16
  path #{TMP_DIR}/out_file_test
@@ -78,5 +79,22 @@ class FileOutputTest < Test::Unit::TestCase
78
79
  path = d.run
79
80
  assert_equal "#{TMP_DIR}/out_file_test._2.log.gz", path
80
81
  end
82
+
83
+ def test_write_with_symlink
84
+ d = create_driver(CONFIG + %[
85
+ symlink_path #{SYMLINK_PATH}
86
+ ])
87
+ symlink_path = "#{SYMLINK_PATH}.gz"
88
+
89
+ time = Time.parse("2011-01-02 13:14:15 UTC").to_i
90
+ d.emit({"a"=>1}, time)
91
+
92
+ # FileOutput#write returns path
93
+ path = d.run
94
+ assert File.exists?(symlink_path)
95
+ assert File.symlink?(symlink_path)
96
+ ensure
97
+ FileUtils.rm_rf(symlink_path)
98
+ end
81
99
  end
82
100
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.35
4
+ version: 0.10.36
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-12 00:00:00.000000000 Z
12
+ date: 2013-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack
@@ -96,7 +96,7 @@ dependencies:
96
96
  requirements:
97
97
  - - ~>
98
98
  - !ruby/object:Gem::Version
99
- version: 1.1.0
99
+ version: 1.1.1
100
100
  type: :runtime
101
101
  prerelease: false
102
102
  version_requirements: !ruby/object:Gem::Requirement
@@ -104,7 +104,7 @@ dependencies:
104
104
  requirements:
105
105
  - - ~>
106
106
  - !ruby/object:Gem::Version
107
- version: 1.1.0
107
+ version: 1.1.1
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: http_parser.rb
110
110
  requirement: !ruby/object:Gem::Requirement
@@ -183,6 +183,7 @@ extra_rdoc_files: []
183
183
  files:
184
184
  - .gitignore
185
185
  - .rvmrc
186
+ - .travis.yml
186
187
  - AUTHORS
187
188
  - COPYING
188
189
  - ChangeLog
@@ -286,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
287
  version: '0'
287
288
  segments:
288
289
  - 0
289
- hash: 748399488166287607
290
+ hash: 1938960347567989865
290
291
  requirements: []
291
292
  rubyforge_project:
292
293
  rubygems_version: 1.8.23