Uh oh!
There was an error while loading. Please reload this page.
fix(supervisor-network): distinguish absent policy binary from filesystem-access failure - #2948
Open
letv1nnn wants to merge 2 commits into
Open
fix(supervisor-network): distinguish absent policy binary from filesystem-access failure#2948letv1nnn wants to merge 2 commits into
letv1nnn wants to merge 2 commits into
Conversation
…stem-access failure Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
letv1nnn
requested review from
a team, derekwaynecarr, mrunalp and sjenning
as code ownersAugust 26, 2026 10:25
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 freeto 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
resolve_binary_in_containerreported an absent non-glob policy binary candidate (ENOENT) with the same WARN as a genuine failure to access/proc/<pid>/root, wrongly telling operators to add CAP_SYS_PTRACE or canonicalize paths. Built-in profiles like pypi list multiple candidate layouts, so images using one layout emitted a burst of misleading warnings on every policy rebuild. This change classifies resolution outcomes into a typed result and logs absent candidates quietly while keeping genuine access failures actionable.Related Issue
Closes#2883
Changes
resolve_binary_in_container'sOption<String>return with a typedBinaryResolutionenum (Resolved, Literal, Absent, Inaccessible, ChainBroken); the resolver no longer logs.proto_to_opa_data_json): Resolved → info, Absent → debug, Inaccessible/ChainBroken → warn. Fixes a pre-existing double-log and a mislabeled broken-chain path./proc/<pid>/rootreachability up front: an unreachable process root (pid gone → ENOENT, or denied → EACCES) is classified Inaccessible, while a leaf ENOENT under a reachable root is Absent — resolving the errno ambiguity.Testing
Since I'm on macOS, I ran the Linux-only tests in a rust:latest Docker container to make sure the
#[cfg(target_os = "linux")]paths actually pass.mise run pre-commitpassesChecklist