fix(box): make CRI reachable over UDS — patch h2 to accept grpc-go authority#10
Merged
Merged
Conversation
added 3 commits
May 31, 2026 16:38
…thority a3s-box-cri rejected every standard gRPC client (crictl, the kubelet, critest). grpc-go >= 1.57 sends the percent-encoded UDS socket path as the HTTP/2 `:authority` pseudo-header (e.g. "%2Frun%2Fa3s-box.sock"), which h2's server validation treats as a malformed authority and answers with a PROTOCOL_ERROR stream reset — before any CRI RPC runs. The `crictl_smoke` integration test is `#[ignore]`, so this was never caught in CI. The fix cannot be a version bump: h2 PR #487 (relax UDS authority) was never merged into any release, and grpc/grpc#38142 was closed "not planned" — the client behaviour is here to stay, and crictl/kubelet expose no authority override. tonic/prost are used only in the cri crate (the runtime gRPC uses raw UnixStream framing), so the fix is contained to a workspace patch. Vendor h2 0.3.27 into third_party/h2 with a surgical relaxation: when `:authority` fails to parse AND looks like a UDS path (empty, leading '/', contains %2F, or ends in .sock), drop it instead of resetting the stream — gRPC routes by `:path`, so the authority is unused server-side. Wired via `[patch.crates-io]` in the workspace manifest. Verified on a /dev/kvm host: crictl now completes the full pod+container lifecycle (version, images, runp, create, start, ps, stop, rm, stopp, rmp) against a3s-box-cri; previously every call failed at CRI-API validation with PROTOCOL_ERROR. Streaming exec/logs/stats remain unwired (separate items). Refs: hyperium/h2#487, grpc/grpc#38142
…il / 17 skip) First critest scoreboard, now that the CRI is reachable over UDS. Captured on a /dev/kvm host with test images mapped to a single cached alpine. Core pod+container lifecycle is conformant; failures group into SecurityContext, seccomp/AppArmor/sysctls, streaming (exec/attach), container logs, volumes/ mounts, namespaces, and networking — each mapped to a roadmap item. ~8 image specs fail as test-setup artifacts (single-image mapping, no registry egress).
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.
P0-#0: a3s-box-cri was unreachable by every standard gRPC client
While bringing up the critest scoreboard (CRI-maturity roadmap #2) on a
/dev/kvmhost,crictlcould not even connect — every call failed at CRI-API validation:Root cause
grpc-go >= 1.57(used bycrictl, the kubelet, andcritest) sends the percent-encoded UDS socket path as the HTTP/2:authoritypseudo-header (e.g.%2Frun%2Fa3s-box.sock). The server'sh2layer rejects it:So the request is killed before any CRI RPC runs. The
crictl_smokeintegration test is#[ignore], which is why this was never caught.Why not a version bump
crictl/kubelet expose no authority override.tonic/prostare used only in thecricrate (the runtime gRPC uses rawUnixStreamframing), so the fix is contained to a workspace patch.Fix
Vendor
h2 0.3.27intothird_party/h2with a surgical relaxation insrc/server.rs: when:authorityfails to parse and looks like a UDS path (empty, leading/, contains%2F, or ends in.sock), drop it instead of resetting the stream — gRPC routes by:path, so the authority is unused server-side. Wired via[patch.crates-io].Verification (real
/dev/kvmhost)crictl versiona3s-box v2.0.4, ApiVersion v1images/runp/create/start/psReady, containerRunningstop/rm/stopp/rmpexec/logs/statsRelease build +
clippy -p a3s-box-cri -D warningsclean with the patch in place.Refs: hyperium/h2#487, grpc/grpc#38142