Code Monkey home page Code Monkey logo

Comments (4)

LordRalex avatar LordRalex commented on June 2, 2024

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.

from pufferpanel.

PolarianDev avatar PolarianDev commented on June 2, 2024

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 SIGTERM is received, all servers are shutdown and their state stored (were they on or off before the restart) in the database, and then the daemon gracefully shuts down too.

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.

from pufferpanel.

LordRalex avatar LordRalex commented on June 2, 2024

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)

from pufferpanel.

PolarianDev avatar PolarianDev commented on June 2, 2024

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.

from pufferpanel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.