Add process manager#1673
Draft
Guerra24 wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a tiny process manager (Hitagi) to handle all the processes that run as part of the server (Mojo, Shinobu, Tsubasa) and exposes a cli-like interface over a Unix socket to allow control of the processes' lifetime. Also takes over and abstracts away all process management that originally existed in the server.
Moves the Minion worker to its own dedicated process like on Windows. Worker.pm -> Tsubasa.pm.
Adds a tiny client on the LRR side that exposes the socket as regular methods.
By default if Hitagi is not running LRR will run with the old process management as if nothing had changed. If it is available then all the process-related code is disabled and instead handled through it.
This is detected by checking if the env variable
HITAGI_SOCKhas a value, if it has one then it assumes the parent process is Hitagi and runs in that mode.Initial client api:
For this initial PR it is only enabled on Docker.
Aside from that it cleans up the remaining S6 jank caused by the stop script.
Provides the restart capabilities (without restarting the whole container) that #1511 needs.
Unblocks slim containers (no valkey and no s6).
Unblocks multi-workers on Windows.