-
Notifications
You must be signed in to change notification settings - Fork 9
Improve Docker Container Signal Handling & Graceful Shutdown #202
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
base: main
Are you sure you want to change the base?
Conversation
|
@K-Mistele just some background on this. We have this mechanism to unregister the node from the hub when node shutdown. This wasn't working for docker properly. Here we are trying to address it. Was wondering what you think of this method and if there are any concerns? Thanks a lot. |
Where does this mechanism live? I can dig into it. I'm guessing because the node used to be shut down with a launch script, but it's not with docker compose, that that's where the issue is. Probably fixable by listening for in the long term though you can't ever 100% control this since someone could force-terminate a naptha node with a SIGTERM, or a compute node could go offline or become unreachable. It may be desirable for the hub to track clients & automatically de-register dead ones after some period of unreachability; shouldn't be too hard since clients have to have a public IP / domain name. |
@K-Mistele Here is the code to shutdown where unregister_node is triggered. |
This PR addresses issues with graceful shutdown of the node-app container in our Docker environment (systemd deployments remain unaffected). The changes ensure that the HTTP server properly receives SIGTERM so that node unregistration is executed before termination.
docker-compose.ymlDockerfile-node-deventrypoint.sh