fix(dmsg): restore proxyproto USE policy (v0.15 REQUIRE default broke dmsg data-plane fleet-wide)#3510
Merged
Conversation
… fleet-wide go-proxyproto v0.15.0 (pulled in by the skycoin#3505 make update-dep bump) changed the zero-value DefaultPolicy from the lenient USE to REQUIRE: a bare `proxyproto.Listener{Listener: ln}` now fails the FIRST Read/Write of any connection that does not open with a PROXY header (ErrNoProxyProtocol). The client-facing dmsg data-plane listener (dmsgserver/api.go) is exactly such a listener: dmsg clients open with a raw Noise handshake, never a PROXY header. So as dmsg servers auto-updated onto develop, they began REJECTING every visor connection — dmsg sessions couldn't establish, and anything that needs dmsg (hypervisor init, route/transport setup) went dark. The dmsg-discovery + tcpproxy HTTP listeners hit the same wall (health checks and the package tests get EOF), which is why TestListenAndServe_Serves / tcpproxy TestListenAndServe_ServesRequests were failing on develop. Fix: give all four proxyproto.Listener sites an explicit ConnPolicy that returns USE — restoring the pre-v0.15 behavior (honor a PROXY header if an upstream proxy sends one, but ALSO accept header-less direct connections). Survives future dep bumps, unlike leaving the default. Sites: dmsgserver (data-plane + health), dmsg-discovery, tcpproxy. Verified: pkg/services/dmsgdisc + pkg/tcpproxy tests now pass; go build ./... clean.
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.
Urgent — fleet-wide dmsg outage
go-proxyprotov0.15.0 (pulled in by the #3505make update-depbump) flipped the zero-valueDefaultPolicyfrom lenient USE to REQUIRE. A bareproxyproto.Listener{Listener: ln}now fails the first Read/Write of any connection that doesn't open with a PROXY header (ErrNoProxyProtocol).The client-facing dmsg data-plane listener (
pkg/dmsg/dmsgserver/api.go) is exactly that: dmsg clients open with a raw Noise handshake, never a PROXY header. So as dmsg servers auto-updated onto develop, they began rejecting every visor connection — dmsg sessions can't establish, and anything needing dmsg (hypervisor init, route/transport setup) goes dark. The dmsg-discovery + tcpproxy HTTP listeners hit the same wall (health checks + their package tests get EOF — this is the developlinux-job red I flagged earlier).Fix
Give all four
proxyproto.Listenersites an explicitConnPolicyreturningUSE— restoring pre-v0.15 behavior (honor a PROXY header if an upstream proxy sends one; also accept header-less direct connections). Explicit policy survives future dep bumps.Sites: dmsgserver (data-plane + health), dmsg-discovery, tcpproxy.
Verified
pkg/services/dmsgdiscTestListenAndServe_Serves now passes (was failing on develop).pkg/tcpproxyTestListenAndServe_ServesRequests now passes.go build ./...clean.Fixes the develop test breakage; unblocks the fleet.