-
Notifications
You must be signed in to change notification settings - Fork 1.1k
CoordinatedShutdown: return non-zero (error) exit code when ActorSystem is removed due to DOWNing #7517
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
Comments
Looks like we already pass in a akka.net/src/core/Akka/Actor/CoordinatedShutdown.cs Lines 218 to 226 in 1f7ffa7
This will get invoked by the akka.net/src/core/Akka.Cluster/ClusterDaemon.cs Lines 846 to 855 in 1f7ffa7
And we know that this setting is effective when nodes are downed due to this test here: akka.net/src/core/Akka.Cluster.Tests/ClusterSpec.cs Lines 560 to 590 in 1f7ffa7
That gives us a good basis, I think, for being able to implement this perhaps. |
We'd need to set the exit code in here someplace: akka.net/src/core/Akka/Actor/CoordinatedShutdown.cs Lines 686 to 730 in 1f7ffa7
My guess is - we could tag some of the |
Is your feature request related to a problem? Please describe.
This issue was raised by a support customer - TL;DR; if Akka.NET could force the process to exit when the Split Brain Resolver (SBR) kicks in using a non-zero exit code in situations where the node is downed, that would allow Windows Services to automatically detect a failure and restart the service more easily.
Describe the solution you'd like
We'd need some way of passing into a parameter like
int exitCode
when we invoke theCoordinatedShutdown
routine if one doesn't already exist. That could be propagated all the way through until theclr-exit
stage if it's enabled - and the return code could be set there.Describe alternatives you've considered
N/A
Additional context
This might be useful in non-Windows contexts too, like K8s supervision
The text was updated successfully, but these errors were encountered: