Watch
0
0
Fork
You've already forked hyperhive
0

vm-tests: a running collector keeps its cursor when it switches to the static user

This commit is contained in:
atlas 2026-11-21 15:04:35 +01:00 • committed by maia
commit a5046c767e

View file

@ -53,10 +53,17 @@ creates it. The user reads nothing else the file mode doesn't already let
every user read. With the node off, the unit and the collector's configuration
are the ones it has without the module.
A collector that already runs as a dynamic user when you turn the node on keeps
its state, such as the journald cursor. systemd moves the state directory out
of `/var/lib/private` for the static user, and the unit sees the files as its
own, so the receiver resumes from its cursor and ships nothing twice.
## Validation
`module-eval-k8s` checks the configuration with the option on and off, the
rendered endpoints, and the ACL's path. The VM test `k8s-node` runs a pod that
rendered endpoints, and the ACL's path. The VM test `k8s-collector-switch`
switches a running collector from a dynamic to the static user and checks that
its cursor survives. The VM test `k8s-node` runs a pod that
writes a `WARN` and an `INFO` line, and checks that the collector's user reads
the pod's log file, that the lines arrive with those severities under the
container's name, and that a metric a pod pushes arrives.