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

LeoFS Gateway - graceful configuration reload #673

Closed
pannon opened this issue Apr 6, 2017 · 7 comments
Closed

LeoFS Gateway - graceful configuration reload #673

pannon opened this issue Apr 6, 2017 · 7 comments

Comments

@pannon
Copy link

pannon commented Apr 6, 2017

Is there a way to gracefully reload gateway configuration without restarting the process itself?

We are modifying the http_custom_header.conf file quite often, would like to avoid gateway restarts if possible to reload the new headers.

@yosukehara
Copy link
Member

@pannon

I've checked the current implementation, which only once load http_custom_header.conf at launching a LeoGateway node:

How often does you reload the configuration? After receiving your answer, we will consider whether we need to implement reloading the configuration feature or not.

@pannon
Copy link
Author

pannon commented Apr 6, 2017

At this stage we are reloading every couple of days. In the testing environments multiple times a day.

@mocchira
Copy link
Member

mocchira commented Apr 7, 2017

@pannon
Thank you for replying.
While still not decided to do what you've requested yet, we are considering your request positively :)

@yosukehara
Just in case,
If we go forward this issue, there are a few ways to realize.

  • Add a reload command to leo_gateway script
    It can be realized through nodetool
### reload .conf files without restarting
$ ./package/leo_gateway/bin/leo_gateway reload
### reload .conf files without restarting
$ kill -HUP ${leo_gateway_pid} 

@pannon
Copy link
Author

pannon commented Apr 7, 2017

Thanks! Maybe something along the lines of nginx -t && nginx -s reload.
Would be nice to have a way for quick config syntax test before reloading, especially when things are plugged into automation frameworks like consul-template, Puppet, Salt, Chef, etc.

This would be a safe choice for most use cases and users.

@mocchira
Copy link
Member

mocchira commented Apr 7, 2017

@pannon Thanks for your suggestion.
Conf test makes sense to me.
As it can be separated as another issue, I filed on #692.

@mocchira
Copy link
Member

WIP.

Note: Since signal handling in Erlang has been supported from OTP20, we go for the nodetool way.

mocchira added a commit to mocchira/leofs that referenced this issue Apr 19, 2018
@mocchira
Copy link
Member

@pannon It's been a long time since you filed this issue. We've finally implemented this feature and it will be shipped with upcoming 1.4.1 (probably today) so please give it a try once it gets released.

# reload
$ ./package/leo_gateway/bin/leo_gateway reload_http_conf
# conf test
$ ./package/leo_gateway/bin/leo_gateway test_http_conf

Feel free to reopen if you find any problems.

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

No branches or pull requests

3 participants