From a79363d80183ecb550f3a508cfb9f21ed1c4b07f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Jul 2026 10:03:00 +0000 Subject: [PATCH] Force eager peer connections in the agent-network e2e harness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The nightly agent-network e2e has been red for ~6 days: every scenario that calls WaitProxyPeer times out with 'client did not see the proxy peer'. The proxy's overlay peer comes up fine, but the client now puts it into the lazy connection manager (server-driven feature flag), so no connection is dialed until traffic flows — and WaitProxyPeer polls 'netbird status' for a Connected peer before sending any traffic. Set NB_LAZY_CONN=false on the harness client and proxy containers so the tunnel dials eagerly and status reflects it, restoring the harness's readiness signal. --- e2e/harness/client.go | 5 +++++ e2e/harness/proxy.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/e2e/harness/client.go b/e2e/harness/client.go index 19210349f..e31173374 100644 --- a/e2e/harness/client.go +++ b/e2e/harness/client.go @@ -56,6 +56,11 @@ func StartClient(ctx context.Context, c *Combined, setupKey string) (*Client, er // Match the proxy: the combined relay is WebSocket-only, so the // client must use WS transport to keep a stable relay link to it. "NB_RELAY_TRANSPORT": "ws", + // Lazy connections defer the peer dial until traffic flows, which + // leaves `netbird status` at "0/N Connected" and starves + // WaitProxyPeer. Force eager connections so the proxy peer shows + // Connected as soon as the tunnel is up. + "NB_LAZY_CONN": "false", }, HostConfigModifier: func(hc *container.HostConfig) { hc.CapAdd = append(hc.CapAdd, "NET_ADMIN", "SYS_ADMIN", "SYS_RESOURCE") diff --git a/e2e/harness/proxy.go b/e2e/harness/proxy.go index 8db2c140f..8d5b7e4f2 100644 --- a/e2e/harness/proxy.go +++ b/e2e/harness/proxy.go @@ -77,6 +77,10 @@ func StartProxy(ctx context.Context, c *Combined, proxyToken string) (*Proxy, er // Management is plain HTTP in-cluster, so allow the proxy token to // ride a non-TLS gRPC connection. "NB_PROXY_ALLOW_INSECURE": "true", + // Keep the embedded overlay peer eager (see the client env note): + // lazy connections leave peers unconnected until traffic, which + // starves the harness's WaitProxyPeer. + "NB_LAZY_CONN": "false", // The combined server multiplexes the relay over WebSocket on :8080 // (no QUIC listener). The proxy's embedded relay client defaults to // QUIC, which fails here and flaps the relay link, churning the