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

Added Supervisord to properly manage mutil processes #216

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

KenRen98
Copy link

@KenRen98 KenRen98 commented Jan 8, 2024

Description

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

All Submissions:

  • [ x ] Have you ensured there aren't other open Pull Requests for the same update or change?
  • [ x ] Have you created a new branch for your changes and PR from that branch and not from your master branch?

@gOOvER
Copy link

gOOvER commented Jan 8, 2024

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

@QuintenQVD0
Copy link
Collaborator

so many commits for 1 change package

@QuintenQVD0
Copy link
Collaborator

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

@KenRen98
Copy link
Author

KenRen98 commented Jan 9, 2024

@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,
pelican-eggs/eggs#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
Copy link
Author

KenRen98 commented Jan 9, 2024

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
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

3 participants