You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P3] XDS versionCount resets to 1 on router restart — config changes may not reach Envoy #617
Severity: P3 (edge case; only affects first restart after exactly one prior snapshot) Component: Network Plane — cmd/atenet/internal/router/xds.go Audit ID: NET-9
Summary
The XDS snapshot version counter is an in-memory int64 starting at 0. Each router
restart begins versioning at 1. If Envoy previously ACKed snapshot version "1" and
the router restarts pushing a new config as version "1" again (same string), the
go-control-plane ADS server may not re-push the config (depending on its same-version
handling). This creates a small window where Envoy's config reflects the pre-restart
state rather than the new state.
varversionCountint64=0// reset to 0 on every process startfuncnextVersion() string {
returnstrconv.FormatInt(atomic.AddInt64(&versionCount, 1), 10)
// First call after restart always returns "1"
}
The go-control-plane cache's behavior when a client reconnects with version_info="1"
and the server's current version is also "1" depends on the implementation:
if the cache treats it as "client already has this version," it may not push an update.
Steps to Reproduce
# Initial state: router running, Envoy has ACKed version "1" (just started)# Confirm via Envoy admin
curl http://localhost:9901/config_dump | jq '.configs[] | select(.["@type"] | contains("ScopedRoutesConfig")) | .version_info'# "1"# Change router config and restart
kubectl set env -n ate-system deployment/atenet-router SOME_PARAM=new_value
kubectl rollout restart -n ate-system deployment/atenet-router
# New router pushes version "1" again (reset counter)# Envoy may not receive the updated config if it reconnects and sends version_info="1"
curl http://localhost:9901/config_dump | jq '...'# May still show old config
Suggested Fix
Initialize versionCount with a monotonically increasing base that survives restarts:
// Use Unix timestamp as base to ensure monotonic increase across restartsvarversionCountint64=time.Now().Unix()
Or use a UUID-based version string that is always different from any prior version,
eliminating the same-version collision entirely:
changed the title [-]XDS versionCount resets to 1 on router restart — config changes may not reach Envoy[/-][+][P3] XDS versionCount resets to 1 on router restart — config changes may not reach Envoy[/+]on Jul 30, 2026
Activity
[-]XDS versionCount resets to 1 on router restart — config changes may not reach Envoy[/-][+][P3] XDS versionCount resets to 1 on router restart — config changes may not reach Envoy[/+]fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique
fix(atenet): make xDS snapshot versions restart-unique