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

If the container dies abruptly, does the Galaxy corrupt? Or other problems happen? #24

Open
BloodyIron opened this issue Jul 11, 2024 · 3 comments

Comments

@BloodyIron
Copy link

Looking to run this in my k8s cluster, and I'm wondering how resilient Avorion or this container is to unexpected baddy scenarios. I don't necessarily plan to be abusive here, but I like building tolerant systems, and understanding where/how things break.

So in the scenario where I (or something) tell the pod to terminate, I'm not certain if that will tell the container to nicely shut down or not. But do you think the Galaxy files would corrupt in this scenario?

In the scenario where the k8s node the pod is running on eats dirt (kernel panic, halt, or some sort of other instant failure), I suspect the container would have no opportunity to be told to nicely shut down. In this scenario do you think the Galaxy files would corrupt?

I'm trying to set my reasonable expectations here and identify what I need to do to guard against scenarios like this causing problems I don't want. So whatever insights can be shared would be appreciated, thanks!

Also, thanks for making and maintaining this image series! Yay! :D Much appreciated.

@rfvgyhn
Copy link
Owner

rfvgyhn commented Jul 11, 2024

The container (e.g docker stop) and Avorion handle SIGTERM properly which will save the game and gracefully shutdown.

While I don't believe the save files would corrupt on a sudden termination, I don't think there's any guarantee. That might be a better question for the Avorion devs on their forum. You might need to have a backup strategy if the save files are important enough to you.

@lightlike
Copy link

lightlike commented Jul 12, 2024

Docker does not handle SIGTERM well when you do not handle that inside the container in some situations.
If you want proper Signal handling you can user https://github.com/krallin/tini or https://github.com/just-containers/s6-overlay.

tini was supposed to be integrated into docker to simply add it during build/run(?) but I did not look into that any further.
s6-overlay is a bit bigger but comes with some other advantages like rootless execution and fully handled UID and GID among other features.

Some more information can be found here

@BloodyIron
Copy link
Author

Well in my testing it seems to be pretty resilient. I beat it up a lot and it seemed to get back up pretty well. And to take extra precaution I also have saves every minute so yeah ;)

Thanks!

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

No branches or pull requests

3 participants