Parent: #3430
Depends on: #3468
Summary
Update the geoprobe-agent to check a user's result destination when sending LocationOffsets, and route offsets there instead of the target IP when set.
The result destination is a single string field on GeolocationUser in host:port format (e.g., 185.199.108.1:9000 or results.example.com:9000). Empty string means not set. The field supports both IP addresses and domain names.
Target discovery changes
controlplane/telemetry/internal/geoprobe/target_discovery.go:
TargetUpdate and ICMPTargetUpdate need to carry the result destination alongside each target
- When extracting targets from
GeolocationUser, read the user's result_destination string
- If non-empty, override the "send-to" address for all of that user's outbound targets
- The
ProbeAddress struct (or a wrapper) needs to distinguish the measure address (ICMP ping / TWAMP target) from the delivery address (where to send the LocationOffset)
Offset delivery changes
controlplane/telemetry/cmd/geoprobe-agent/main.go (sendCompositeOffsets):
- Currently builds
targetAddr from addr.Host:addr.Port (the measurement target)
- When a delivery address is present, use that instead
- ICMP targets with no result destination: log a warning and skip sending (nothing is listening)
DNS resolution for domain destinations
When the result destination contains a domain name (not an IP), the agent needs to resolve it:
- Parse the host portion: try
net.ParseIP first; if that fails, treat as domain
- Resolve domain via
net.LookupHost (or net.ResolveUDPAddr)
- Cache the resolved IP with a TTL (~5 minutes) to avoid per-cycle DNS lookups
- If resolution fails, log a warning and skip sending for that cycle (don't block other targets)
Testing
- Unit tests for target discovery: user with result destination set → delivery address overrides target address
- Unit tests for target discovery: user without result destination → delivery address equals target address
- Unit tests: ICMP target without result destination → warning logged, offset not sent
- Unit tests: domain destination → DNS resolution used, result cached
- E2E test (if feasible): ICMP target with result destination receives offsets at the specified endpoint
Parent: #3430
Depends on: #3468
Summary
Update the geoprobe-agent to check a user's result destination when sending LocationOffsets, and route offsets there instead of the target IP when set.
The result destination is a single string field on
GeolocationUserinhost:portformat (e.g.,185.199.108.1:9000orresults.example.com:9000). Empty string means not set. The field supports both IP addresses and domain names.Target discovery changes
controlplane/telemetry/internal/geoprobe/target_discovery.go:TargetUpdateandICMPTargetUpdateneed to carry the result destination alongside each targetGeolocationUser, read the user'sresult_destinationstringProbeAddressstruct (or a wrapper) needs to distinguish the measure address (ICMP ping / TWAMP target) from the delivery address (where to send the LocationOffset)Offset delivery changes
controlplane/telemetry/cmd/geoprobe-agent/main.go(sendCompositeOffsets):targetAddrfromaddr.Host:addr.Port(the measurement target)DNS resolution for domain destinations
When the result destination contains a domain name (not an IP), the agent needs to resolve it:
net.ParseIPfirst; if that fails, treat as domainnet.LookupHost(ornet.ResolveUDPAddr)Testing