fix(docker): seed s6 gateway state for legacy gateway run containers - #35341
Closed
teknium1 wants to merge 2 commits into
Closed
fix(docker): seed s6 gateway state for legacy gateway run containers#35341teknium1 wants to merge 2 commits into
teknium1 wants to merge 2 commits into
Conversation
Contributor
Author
|
@benbarclay tagging you for the container/s6 surface — this seeds root |
Contributor
🔎 Lint report:
|
Collaborator
Collaborator
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.
Summary
Containers upgrading from the legacy tini image (
command: gateway runin docker-compose) auto-start the gateway again after pulling the s6-overlay image. Previously the s6 reconciler saw nogateway_state.json, defaulted the gateway slot down, and left it silently stopped.Salvage of #34829 by @donovan-yohan, cherry-picked onto current main with authorship preserved.
Changes
hermes_cli/container_boot.py: when no rootgateway_state.jsonexists and PID 1's argv is the legacygateway run, seed root state asrunningso the reconciler brings the default slot up. Respects--no-superviseandHERMES_GATEWAY_NO_SUPERVISE. Only seeds when no state file exists, so explicit stopped/failed states keep winning.tests/hermes_cli/test_container_boot.py: regression coverage for legacy seed (bare + wrapped argv), both opt-outs, and explicit-stopped-wins.Validation
scripts/run_tests.sh tests/hermes_cli/test_container_boot.py— 31 passedreconcile_profile_gateways()calls: legacygateway run(bare + wrapped) seedsrunningand starts;--no-supervise(flag + env) does not seed and leaves the down marker; explicit pre-existingstoppedis preserved; non-gateway-run cmd does not seed.Closes #34339
Infographic