Conversation
714e735 to
54fa84c
Compare
7b30930 to
8e67434
Compare
54fa84c to
8d08c40
Compare
8443cc5 to
e77ee29
Compare
f147a2c to
54c0d9e
Compare
aedc465 to
1bfdbfc
Compare
5ec76d1 to
e5bd4e2
Compare
palas
left a comment
There was a problem hiding this comment.
It all looks pretty robust. Just a couple of suggestions. The main thing is considering what happens when runRpcServer finishes somehow
cardano-node/src/Cardano/Node/Run.hs
Outdated
| if enabled | ||
| then | ||
| race_ | ||
| (runRpcServer (rpcTracer tracers) (config, networkMagic)) |
There was a problem hiding this comment.
I think it is worth highlighting (if I understood correctly) that if runRpcServer:
- Exits successfully but prematurely, it will restart immediately (if this happens at set-up, for example, it will enter a loop).
- Exits with an exception, I am guessing the exception will get propagated and kill the node.
Not sure whether that is desirable or not, maybe it is worth considering having a restart limit, or an exception catching mechanism here.
Also, it may be worth logging if the rpc server restarts for some reason other than config changed, (or if it crashes if you end up catching the exceptions)
There was a problem hiding this comment.
Exits with an exception, I am guessing the exception will get propagated and kill the node.
This will not happen because the async of rpc server is never joined.
it may be worth logging if the rpc server restarts for some reason other than config changed, (or if it crashes if you end up catching the exceptions)
Exception handler in cardano-rpc uses tracers to log the exception.
Exits successfully but prematurely, it will restart immediately (if this happens at set-up, for example, it will enter a loop).
Good catch. I think we should disable gRPC in such case. To avoid looping.
49f217f to
38f5d46
Compare
palas
left a comment
There was a problem hiding this comment.
Thanks, it looks good now. The only thing is it would now be good now to log that the rpc server was disabled because it terminated, as part of disableRpcServer maybe
38f5d46 to
e156823
Compare
Description
This PR adds a configuration reloading for gRPC on SIGHUP.
Closes: #6249
Checklist
See Runnings tests for more details
CHANGELOG.mdfor affected package.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-9.6andghc-9.12Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.