Fix ROCm detection false-negative in Harbor doctor due to pipeline exit code 141 - #254
Open
zackbcom wants to merge 1 commit into
Open
Fix ROCm detection false-negative in Harbor doctor due to pipeline exit code 141#254zackbcom wants to merge 1 commit into
zackbcom wants to merge 1 commit into
Conversation
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
This change fixes a false ROCm warning in Harbor doctor caused by the
amdgpumodule check using a pipeline withgrep -q.The previous check could surface a broken-pipe style exit status (
141) duringharbor doctor, which caused the ROCm detection path to behave incorrectly even though the underlying module check itself was fine.System
Running on Debian 13 VM
What changed
lsmodoutput first and then checks it in-memory.amdgpuis loadedWhy this was happening
The old pattern effectively used:
That can return a non-zero status like
141in some shell/pipeline cases, which is interpreted as a failed check even whenamdgpuis present.Examples of how it fails
Example 1: normal module present, but pipeline exits with 141
This is the behavior that was surfacing in
harbor doctor.Example 2: direct check works, but pipeline-based check looks broken
The module is clearly present, but the
-qpipeline form can still trip a broken-pipe style failure depending on shell behavior.Example 3: false warning in doctor
Before the fix, the doctor output could show:
Even though the system actually had the
amdgpumodule loaded.Result
harbor doctornow evaluates the ROCm module check reliably and no longer misreports ROCm support as incomplete due to pipeline exit code issues.