fix(install): never let apt remove ROCm packages during dependency setup (EAI-7957) - #238
Open
fredespi wants to merge 5 commits into
Open
fix(install): never let apt remove ROCm packages during dependency setup (EAI-7957)#238fredespi wants to merge 5 commits into
fredespi wants to merge 5 commits into
Conversation
…957) `apt-get install -y` assumes yes for removals as well as installs, so the automatic OpenMPI/libatomic/libnuma setup could apply a dependency solution that removes the ROCm stack. This runs unattended under `rocm install sdk` whenever root or passwordless sudo is available, so a pre-existing ROCm install could be broken with no prompt. Simulate each apt install with `apt-get -s` first and abort when the transaction would remove a ROCm/AMDGPU package, naming every affected package. Other package managers are unaffected: their plans are additive and have no assume-yes removal path. Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
… to end Pre-PR review found the protected-package matcher too narrow and the new user-visible refusal untested at the behaviour level. Match ROCm packages by component-family prefix instead of requiring a `<family>-` shape. Core packages such as hsakmt-roct, llvm-amdgpu, rocminfo and hipblas are dashless, so the previous rule did not match them and apt could still remove them. The matcher now deliberately favours recall: a false positive only asks the user to install by hand, while a false negative breaks their ROCm install. Add the Gherkin scenario root AGENTS.md requires for user-observable behaviour. It plants a runtime registry entry and stands in for the package manager, so it needs no GPU, no engine install and no network, and asserts the CLI refuses, refuses before installing anything, and names every ROCm package at risk. Verified as a regression test: it fails with the guard removed and passes with it. Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
…scenario Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
fredespi
force-pushed
the
vllm-openmpi-auto-setup-removes-rocm-system
branch
from
August 12, 2026 17:18
f884097 to
681b91a
Compare
Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
…up-removes-rocm-system Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
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 install sdkcould remove a working ROCm installation without asking.Installing vLLM needs the OpenMPI runtime, which the CLI installs through the host package manager with
apt-get install -y. That-yassumes yes for package removals as well as installs, so when apt decided to satisfy OpenMPI by evicting the ROCm stack, it went ahead unattended — the SDK install runs this path automatically whenever it has root or passwordless sudo. The field report sawrocm,rocm-hip,rocm-hip-runtime-dev,mivisionx-devandrpp-devremoved while an older toolchain was pulled in, breaking a working ROCm 7.14 install.This makes that transaction fail loudly instead of silently destroying the installation.
Changes
apt-get installstep, simulate it first withapt-get -sand parse the removals apt reports.--yespath and the unattended path alike, since the reported breakage happened unattended.hsakmt-roct,llvm-amdgpu,rocminfo,hipblas), so matching only on a<family>-shape would miss them.openmpi-bin,mpich,libnuma1,libatomic1) removable, so the guard cannot block the very install it protects.Test plan
crates/rocm-core/src/openmpi.rscover removal parsing (including apt's trailing*), the simulate argv (adds-s, drops-y, tolerates asudoprefix, ignores non-apt commands), and the package classifier — with the dashless core package names as explicit regression cases.@id:deps-guard-refuses-rocm-removal(tests/e2e-cucumber/features/dependency_guard.feature) covers the user-visible behaviour: it asserts the CLI refuses, refuses before installing anything, and names every ROCm package at risk. It plants a runtime registry entry and stands in for the package manager, so it needs no GPU, no engine install and no network, and runs on the default mock lane.The scenario is Linux-only (
@requires-os:linux) and assumes an apt host, which every Linux CI lane is; the guard is apt-specific by design. That precondition is recorded in the feature file.Fixes EAI-7957.