Skip to content

internet-latency-collector: add node file generate and verify commands - #4314

Draft
thijsvanemmerik wants to merge 1 commit into
tve/cloud-latency-03-aws-reachabilityfrom
tve/cloud-latency-04-nodefile-commands
Draft

thijsvanemmerik wants to merge 1 commit into
tve/cloud-latency-03-aws-reachabilityfrom
tve/cloud-latency-04-nodefile-commands

Conversation

@thijsvanemmerik

Copy link
Copy Markdown
Contributor

Part of measuring latency between AWS regions with the internet latency collector.

The collector reads a node file listing each cloud region, its RIPE Atlas probe IDs, and an address
in that region that answers ping, and nothing keeps that file correct. This adds nodefile generate
and nodefile verify, and commits the file for 17 AWS regions.

The probes hosted in AWS regions do not answer ping, so each region needs its own target address,
taken from the list AWS publishes for reachability testing. generate pings those addresses and
writes the first that answers, keeping the address already in the file when it still answers, so
regenerating an unchanged file rewrites the same bytes. verify fails when an address has left the
published list or stopped answering. --skip-ping runs the published-list check alone.

It also changes how the binary is built. Until now cmd/collector held a single Go file, and both
the Makefile and the goreleaser config built cmd/collector/main.go, which compiles that one file
and nothing else. This PR adds a second file there, so both now build ./cmd/collector. Without
that change the binary and the .deb would not compile.

Nothing else changes. The new commands run only when called, and nothing calls them.

Test: go test ./controlplane/internet-latency-collector/cmd/collector/.... By hand, from
controlplane/internet-latency-collector: go run ./cmd/collector nodefile verify.

nodefile generate fills each region's ping target from the AWS published address
list, keeping the current target when it still answers. nodefile verify checks a
committed file against the same list and reports every problem at once rather
than stopping at the first.

Adds config/nodes-aws.json, seventeen AWS regions with up to four RIPE Atlas
probe IDs each, ordered with the preferred probe first. A signal during either
command reports cancellation instead of naming live addresses as dead.

The collector's main package now spans more than one file, so the make and
release builds name the package instead of main.go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant