From c167798be5a0c2ccdb074549ea229543a537fbf5 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Fri, 19 May 2017 14:15:08 +0900 Subject: [PATCH 1/2] Validate workers options on standalone mode --- lib/fluent/supervisor.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index 8d25f5230c..2f45735ff5 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -490,6 +490,10 @@ def run_worker read_config set_system_config + if @standalone_worker && @workers != 1 + raise Fluent::ConfigError, "invalid number of workers (must be 1 or unspecified) on standalone mode" + end + install_main_process_signal_handlers # This is the only log messsage for @standalone_worker From 70e7d8e761719ad8461d0633e06a567a9f7ebeb0 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Mon, 22 May 2017 17:53:17 +0900 Subject: [PATCH 2/2] Fix error msg --- lib/fluent/supervisor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index 2f45735ff5..3ce7ddf947 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -491,7 +491,7 @@ def run_worker set_system_config if @standalone_worker && @workers != 1 - raise Fluent::ConfigError, "invalid number of workers (must be 1 or unspecified) on standalone mode" + raise Fluent::ConfigError, "invalid number of workers (must be 1 or unspecified) with --no-supervisor: #{@workers}" end install_main_process_signal_handlers