fix(uninstall): stop managed services before removing the tooling that stops them (EAI-8014) - #299
Open
fredespi wants to merge 1 commit into
Open
fix(uninstall): stop managed services before removing the tooling that stops them (EAI-8014)#299fredespi wants to merge 1 commit into
fredespi wants to merge 1 commit into
Conversation
…t stops them (EAI-8014) `rocm uninstall` reported completion while a managed model server — including a publicly-bound, GPU-holding vLLM endpoint — kept running, then deleted the binaries and service records needed to stop it, leaving only a manual PID kill. Stop every live managed service before removing anything. If any cannot be confirmed stopped, abort non-zero and remove nothing so the recovery tooling stays in place. Reuses the verified process-tree termination path used by `rocm services stop`. Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
fredespi
force-pushed
the
rocm-uninstall-reports-success-while-leaving-a
branch
from
August 22, 2026 14:18
d1e9c4e to
0bebf62
Compare
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
rocm uninstallreporteduninstall complete(RC=0) while a managed model server was still running — including a publicly-bound, GPU-holding vLLM endpoint — and then deleted therocm/rocmdbinaries and service records needed to stop it. The supportedrocm services stoppath was gone, leaving only a manual PID kill to release the GPU.This change stops managed services before removing anything, and refuses to proceed if it cannot.
Changes
apps/rocm/src/uninstall.rs: after the confirmation gate and before removing any path, stop every live managed service. If any cannot be confirmed stopped, abort with a non-zero exit and remove nothing — so the tooling needed to recover (rocm services stop) stays in place. The error names the offending services and how to stop them. On success, report how many were stopped, then proceed with removal.apps/rocm/src/main.rs: newstop_managed_services_before_uninstall()returning aManagedServiceStopReport { stopped, failed }. It reuses the existing verified process-tree termination path (stop_internal_managed_service/terminate_recorded_service_pids) thatrocm services stopalready uses, so a service is only counted stopped once every recorded process is confirmed gone; a service that merely crashed (not live) is skipped and does not block uninstall.Test plan
apps/rocm):uninstall_stops_live_managed_service_and_reports_it— a live managed server is stopped and reported before uninstall proceeds.uninstall_skips_already_dead_managed_service— a crashed (non-live) service neither counts as stopped nor aborts uninstall.cargo clippy -p rocm --all-targets -- -D warningsclean;cargo test -p rocmpasses (verified in a Linux container).uninstall-stops-what-it-managesscenario in the README-walkthrough contract PR (test(e2e): pin the contracts a README walkthrough expects (EAI-8024) #241): "the server is no longer running" after the managed files are removed.