-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(model-router): stop/recover router on uninstall & onboard; extend gateway health wait #5230
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
Closed
tyeth-ai-assisted
wants to merge
4
commits into
NVIDIA:main
from
tyeth-ai-assisted:fix/model-router-uninstall-recover
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
68d9148
fix(uninstall): stop model router and extend Hermes gateway health wait
tyeth 0b29d04
fix(model-router): auto-recover orphaned router on fresh onboard session
tyeth 78f2415
fix(model-router): detect Python-interpreted model-router in /proc an…
tyeth 9699ae0
Merge branch 'main' into fix/model-router-uninstall-recover
cv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve the shields-up lock state when rewriting
.env.If
.envstarts in the locked posture (root:rootand non-writable), this helper always restores it tosandbox:sandbox 640. That makeshermes_config_root_is_locked()go false andrestore_hermes_config_permissions_after_dashboard_start()then downgrades the whole config root back to mutable3770, so a post-upgrade boot silently disables shields-up on previously locked sandboxes.Suggested fix
ensure_hermes_api_server_key() { local env_file="${HERMES_DIR}/.env" local hash_file="${HERMES_HASH_FILE}" local compat_hash="${HERMES_DIR}/.config-hash" + local env_was_locked=0 [ -f "$env_file" ] || return 0 + if hermes_config_path_is_locked "$env_file"; then + env_was_locked=1 + fi + grep -q "^API_SERVER_KEY=" "$env_file" 2>/dev/null && return 0 @@ if [ "$(id -u)" -eq 0 ]; then - chown sandbox:sandbox "$env_file" 2>/dev/null || true - chmod 640 "$env_file" 2>/dev/null || true + if [ "$env_was_locked" -eq 1 ]; then + chown root:root "$env_file" 2>/dev/null || true + chmod 444 "$env_file" 2>/dev/null || true + else + chown sandbox:sandbox "$env_file" 2>/dev/null || true + chmod 640 "$env_file" 2>/dev/null || true + fi fiBased on learnings, the normal
640 sandbox:sandboxmutable posture is intentional here, but the locked integrity posture is supposed to remain distinct and preserved across startup mutations.🤖 Prompt for AI Agents
Source: Learnings