fix(envd): skip MMDS polling in containerized deployments - #3644
Luckydog691 wants to merge 1 commit into
Conversation
MMDS is not served in containerized (isNotFC) environments: the futile polling leaks dangling in-flight connections and can break runsc checkpointing. Mirror the guard in main.go.
|
We require contributors to sign our Contributor License Agreement, and we don't have @Luckydog691 on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check' |
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @Luckydog691 on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check' |
|
The cla-bot has been summoned, and re-checked this pull request! |
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
What was broken
main.goguards its startup MMDS poll withif !isNotFC, and the-isnotfcflag is documented as "run outside of Firecracker (skips MMDS poll and HTTP log exporter)". The/inithandler still started the same 60s polling loop unconditionally: every attempt opens a TCP connection to169.254.169.254:80, which with no MMDS endpoint reachable stays half-open inSYN_SENTfor the whole poll window.That dangling connection becomes fatal on checkpoint: a gVisor (runsc) checkpoint taken while it exists panics in the TCP endpoint save path (
resetConnectionLockeddereferences a nil snd/rcv), so checkpointing fails deterministically for the whole poll window.Fix
Mirror the guard
main.goalready applies to its startup poll: skip the MMDS polling in/initwhenisNotFCis set. Firecracker-based deployments are unchanged.Verification
SYN_SENTconnection to169.254.169.254:80is observable for ~60s after/initbefore the change; it never appears after it.go build ./...andgo test ./internal/api/pass.Supersedes #3638. Does not address #3559, which concerns
/initretries in Firecracker deployments.