IPv6 health checks, forward writer close, comment register - #143
Merged
Merged
Conversation
An IPv6 workload address (the oci hook's fallback on a single-stack v6 network) was joined as ip:port, which the dialer rejects, so a tcp_ports health check never passed.
…act once, no loop that never loops Applies the /code comment budget (interface-implementing methods omit godoc; the same fact is not stated twice) and the logger-access rule.
The five second wait protected one line: a forward that had its target in hand when stopForwarding removed it. Every later line finds no target and never reaches the writer. That line now counts as a forward drop. c23d618 described this change and did not make it. TestNewWriters waits for its goroutines instead of sleeping seven seconds.
Applies the /code comment register. A comment that leads with a code identifier or a tool's own name keeps that case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whole-repo read after v0.1.3: one bug fix, one behavior change the 09-03 round described and never made, and style. Four commits.
Bug
A TCP health check never passed for an IPv6 workload address.
Probejoined the address asip:port, so::1:8080reached the dialer, which rejects it. The oci hook falls back to the IPv6 address on a single-stack network, so a workload there withtcp_portsstayed unhealthy. Both the TCP and the HTTP address now go throughnet.JoinHostPort. Regression test: a listener on[::1]:0with a TCP and an HTTP check; it failed before the fix.Forward writer close
The writer waited five seconds between its context being cancelled and the close.
stopForwardingremoves the target before it releases the writer, so every later line finds no target and never reaches the writer. The wait protected one line: a forward that had its target in hand at that moment. That line now counts as a forward drop. c23d618 described this change; its diff never touchedlogs/.TestWriterClosesOnceItsContextIsCancelledpins it (fails with the wait, passes without).TestNewWriterswaits for its goroutines instead of sleeping seven seconds.Style
SetNodeStatus,WorkloadExists),WritePidtags itsFatalf, the workload id fact is stated once,PullLogloses aforthat never looped.Hardware
Two bare-metal hosts (Debian 13, kernel 6.12, systemd 257), one agent per host as its own node, both reporting to one core (master dde58633, embedded etcd). Three process workloads per host, each a
python3 -m http.serverunit with a TCP and an HTTP check in its meta file, on127.0.0.1, on::1and on the host's global IPv6 address. Arms interleaved base, PR, base, PR; base is master 95d8bbb, PR is b6b58d3. The meta files and units were written by hand in the shape core's process engine writes them, so core held no workload record for them.127.0.0.1workload: probes failed / HTTP GETs served::1workload: probes failed / HTTP GETs servedOn base the TCP probe fails with
too many colons in addressand the HTTP probe withinvalid port ... after host, so both checks were broken for an IPv6 address, not only the TCP one. Both nodes stayedavailablein core for the whole round, and core logged no error.Forwarded lines reached the sink at the same rate in both arms: 3 per workload per window.
Not in this PR
The systemd MainPID fan-out and the concurrent
Multi.Liststay. A cut keeps the results and slows the listing. Measured on the same two hosts with one test binary that holds both shapes (60 rounds, arms interleaved, order swapped each round, every workload needing the MainPID lookup; the two hosts agree within 1 ms):Listp50The cocoon runtime had no daemon and no VM here, so its list is a directory read; a node whose second runtime is containerd was not measured.
Evidence
GOWORK=off:make lint0 issues on linux and darwin,make fmt-check,asl ./...on both,go test -race -count=1 ./...all pass. Comments: +2/-4 across the PR.Release note: #142 needs a core release that carries core #757, so this ships after core.