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
Keep server state on daemon restart #1270
Comments
This is pretty hard to do, because process tracking and making things "zombies" is a dangerous game. Generally, it is not safe to have "zombie" processes, especially ones which are as large as a game server. Hooking back into a process is also generally not trivial, and not safe. That said, this is easier for docker, but it would be hard to know when "we" should actually kill servers (i.e you want the server off to do a reboot of the machine, or you are doing larger maintenance) systemctl doesn't let us do that well, because of how both states are. |
I do not know how this is a bad thing, currently pufferpanel manages whether a server is on or off and has said state for it. When When the daemon is started, the states are fetched and those who were on before the server shutdown and started again. I see no reason for why this couldn't be implemented. |
The state is just "does the PID exist". It's not persisted anywhere currently, nor does the panel even know of it. This is a node-level thing, not a panel. Nodes don't have access to a db. (That said, I did originally read it as keeping servers running while a daemon was restarted, so my comments aren't fully accurate) |
Well an ugly way to do this is a node dumps the current active servers to a json file until it is started again. But it protocol used to communicate between daemon and panel would need to be updated, on shutdown a daemon tells the panel the state of all the servers on said node, then on daemon start it calls back asking for what servers need to be started. But this is not a quick and easy way to implement said feature. |
Is your feature request related to a problem? Please describe.
Currently there is only a boolean method of starting servers when pufferpanel is restarted:
However this is awkward, because there are times you only want the server started if the server was started before the restart, or keep it off if the server was off before the restart, in other words "keeping the server state".
Describe the solution you'd like
By default:
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: