Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ServerEngine #880

Merged
merged 5 commits into from
May 10, 2016
Merged

Add ServerEngine #880

merged 5 commits into from
May 10, 2016

Conversation

naritta
Copy link
Member

@naritta naritta commented Apr 4, 2016

https://github.com/fluent/fluentd/wiki/Fluentd-running-on-ServerEngine

implement
・Logging
・Signal handler
・Daemonize
・Worker processes

@repeatedly
Copy link
Member

Could you add remaining list on the description?

@naritta
Copy link
Member Author

naritta commented Apr 5, 2016

I got it.

@naritta
Copy link
Member Author

naritta commented Apr 11, 2016

remaining is:
・create cache for loading config
・fix rpc_server signal handler
・add tests

@cosmo0920
Copy link
Contributor

Here is GitHub.
We can use task list in descriptions with GFM: https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments

@naritta
Copy link
Member Author

naritta commented Apr 12, 2016

Now, the main signal handler in fluentd and serverengine is like below.

fluentd serverengine(default)
INT/TERM graceful shutdown graceful shutdown
HUP graceful restart graceful restart(not when worker_type is "process")
USR1 flush buffer graceful restart

Then I fixed
・to use INT/TERM and HUP handler on serverengine for graceful shutdown and restart.
・let USR1 handler on fluentd as it is for flush buffer.

As a result, the signal handler will be same as ordinal fluentd like below.

fluentd
INT/TERM graceful shutdown
HUP graceful restart
USR1 flush buffer

@naritta
Copy link
Member Author

naritta commented Apr 12, 2016

@repeatedly
fluentd signal handler(here USR1) is prior to serverengine signal handler, so we need to concern about USR1 restarting function. flush buffer is executed if it got USR1.
But if you concern about it and we should set other signal (like WINCH?) as restarting function on serverengine just in case, please let me know.

@naritta naritta force-pushed the add-serverengine branch 3 times, most recently from 5b2db6c to b744a53 Compare April 14, 2016 10:05
@naritta
Copy link
Member Author

naritta commented Apr 15, 2016

[MEMO] The remaining problem is
・cause error in binding UDP handle after closing and creating again.
・can't use fiddle in Ruby21-x64 and Ruby22-x64.

$log = Fluent::Log.new(STDERR, Fluent::Log::LEVEL_TRACE)
dl_opts = {}
dl_opts[:log_level] = Fluent::Log::LEVEL_TRACE
logdev = Fluent::Test::DummyLogDevice.new
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fluent::Test::DummyLogDevice is just for tests. Use STDERR as before.

@naritta naritta force-pushed the add-serverengine branch 9 times, most recently from 9ffcc6a to a5f1307 Compare April 27, 2016 05:52
@naritta naritta changed the title [WIP] Add ServerEngine Add ServerEngine Apr 27, 2016
@naritta naritta force-pushed the add-serverengine branch 8 times, most recently from 5ceeb02 to 68448fe Compare April 28, 2016 09:09
@naritta naritta force-pushed the add-serverengine branch from 68448fe to 87ef5f3 Compare May 10, 2016 16:54
@tagomoris
Copy link
Member

This looks ready to merge.

@tagomoris tagomoris merged commit a5511a1 into fluent:master May 10, 2016
@tagomoris
Copy link
Member

Done!

@naritta
Copy link
Member Author

naritta commented May 11, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants