fix(gateway): use service restart path in Docker/Podman containers - #25219
Closed
bird wants to merge 1 commit into
Closed
fix(gateway): use service restart path in Docker/Podman containers#25219bird wants to merge 1 commit into
bird wants to merge 1 commit into
Conversation
The /restart command used a detached subprocess approach to restart the gateway. In Docker, when the gateway process exits, tini (PID 1) also exits, causing Docker to stop the container and kill the detached helper before it can restart the gateway. This made /restart effectively a /shutdown in containerized deployments. Detect Docker (/.dockerenv) and Podman (/run/.containerenv) containers and use the service restart path (exit code 75) instead, letting the container restart policy handle the actual restart. Note: requires restart policy that restarts on non-zero exit (e.g. unless-stopped or on-failure).
This was referenced May 13, 2026
teknium1
added a commit
that referenced
this pull request
May 17, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR #25219) - @davidcampbelldc (PR #26834) (zccyman, wesleysimplicio already mapped from prior groups.)
teknium1
added a commit
that referenced
this pull request
May 17, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR #25219) - @davidcampbelldc (PR #26834) (zccyman, wesleysimplicio already mapped from prior groups.)
Contributor
|
Merged via PR #27550 — your commit was cherry-picked onto current |
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR NousResearch#25219) - @davidcampbelldc (PR NousResearch#26834) (zccyman, wesleysimplicio already mapped from prior groups.)
Seven74AI
pushed a commit
to Seven74AI/hermes-agent
that referenced
this pull request
Jun 13, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR NousResearch#25219) - @davidcampbelldc (PR NousResearch#26834) (zccyman, wesleysimplicio already mapped from prior groups.)
alt-glitch
pushed a commit
that referenced
this pull request
Jun 14, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR #25219) - @davidcampbelldc (PR #26834) (zccyman, wesleysimplicio already mapped from prior groups.)
T02200059
pushed a commit
to T02200059/hermes-agent
that referenced
this pull request
Jun 18, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR NousResearch#25219) - @davidcampbelldc (PR NousResearch#26834) (zccyman, wesleysimplicio already mapped from prior groups.)
liuchanchen
pushed a commit
to liuchanchen/hermes-agent
that referenced
this pull request
Jun 23, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR NousResearch#25219) - @davidcampbelldc (PR NousResearch#26834) (zccyman, wesleysimplicio already mapped from prior groups.)
donbowman
pushed a commit
to donbowman/hermes-agent
that referenced
this pull request
Jul 13, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR NousResearch#25219) - @davidcampbelldc (PR NousResearch#26834) (zccyman, wesleysimplicio already mapped from prior groups.)
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…tors Final LHF run group. Adds release-note attribution mappings for: - @bird (PR NousResearch#25219) - @davidcampbelldc (PR NousResearch#26834) (zccyman, wesleysimplicio already mapped from prior groups.)
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.
Fixes #25218
The
/restartslash command used a detached subprocess approach to restart the gateway. In Docker/Podman, when the gateway process exits, tini (PID 1) also exits, causing Docker to stop the container and kill the detached helper before it can restart the gateway. This made/restarteffectively a/shutdownin containerized deployments.Changes
Detect Docker (
/.dockerenv) and Podman (/run/.containerenv) containers in_handle_restart_commandand use the service restart path (exit code 75) instead. This lets the container's restart policy (e.g.unless-stoppedoron-failure) handle the actual restart — the same approach already used for systemd.Notes
os.path.exists()on well-known container sentinel files