-
Notifications
You must be signed in to change notification settings - Fork 81
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
cli: reload RPC-server TLS config on SIGHUP #1945
Conversation
I've tested it locally with the help of |
Codecov Report
@@ Coverage Diff @@
## master #1945 +/- ##
==========================================
- Coverage 82.92% 82.88% -0.04%
==========================================
Files 289 289
Lines 22883 22896 +13
==========================================
+ Hits 18975 18977 +2
- Misses 2713 2725 +12
+ Partials 1195 1194 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's
- always set SIGHUP handler
- restart RPC even if TLS is not configured
In future we might also reread whole config, allow some service configuration changes and restart all services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the test, we do run node IIRC in our tests, so it should be possible to add a test also.
ea69feb
to
ee3bab0
Compare
We do it via |
ee3bab0
to
021f05d
Compare
Then we can probably leave these tests for #1576. |
cli/server/server.go
Outdated
@@ -337,7 +351,17 @@ Main: | |||
shutdownErr = fmt.Errorf("server error: %w", err) | |||
cancel() | |||
|
|||
case <-rpcServerRestartChan: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't you listen sighupCh
here directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original design required a separate channel, but it's OK now to use sighupCh
, so fixed.
One thing that probably can be improved is documentation, how will anyone find out anything about this feature? |
Close #1892.