pelican-eggs / yolks

Docker images designed for use with Pterodactyl's Egg system.
MIT License
86 stars 241 forks source link

Added Supervisord to properly manage mutil processes #216

Open KenRen98 opened 7 months ago

KenRen98 commented 7 months ago

Description

Just added Supervisord for multi process, thats used in DST to replace co-process command

All Submissions:

gOOvER commented 7 months ago

And what's the point? I don't see any advantage here now

QuintenQVD0 commented 7 months ago

so many commits for 1 change package

QuintenQVD0 commented 7 months ago

@KenRen98 This will need to become a diffrend image, do not add this to the source on

KenRen98 commented 7 months ago

@KenRen98 This will need to become a diffrend image, do not add this to the source on And what's the point? I don't see any advantage here now

This is meant to fix a bug for DST egg, please read here, https://github.com/parkervcp/eggs/issues/2651

But I haven't do PR to eggs, since I noticed a small imperfection, Caves under current setting cannot exit gracefully. Which may cause unsaved data loss.

Sadly, I tried many things, currently haven't found a good solution to it, if you guys want to help, I would be grateful. So the issue here is the one brougt to forground would receive the c_shutdown() from shutdown command, but the other will not, and DST would not take SIGTERM SIGINT or any other Signals. Only c_shutdown() as graceful termination.

What I have tried:

  1. Bring both to fg mode (forground) then try use start command to output a second c_shutdown()
  2. Use screen command (faild since the runner uid has no username which caused screen command error)
  3. Write a supervisord listener to trigger the termination of a Caves
  4. Write a warpper script for Caves to start it and trap a SIG and somehow shutdown Caves gracefully

Next I am going to try:

  1. Write a warpper script for Caves to detect connection lost to Master then terminate it using c_shutdown()

Hopefully I can get this work, the oringinal egg's problem is relatively more painful to me since most people would play this game with Mods, but if Caves dont have mods its very stupid, not even to mention some Mods would require both Shards to have it, otherwise rollout errors when transporting in between two Shards.

Thanks for replying anyway. Hope for the best & Happy new year!

KenRen98 commented 7 months ago

BTW, you can definitely use c_shutdown() manually if both of them are in forground mode, but just very stuipid if the user need to click shutdown and then wait first to shutdown and then put c_shutdown() manually to shutdown Caves

QuintenQVD0 commented 7 months ago

@KenRen98 {{ }} will not work anywhere except the egg startup, you must use ${} to reference variables