Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/nix/vm-tests
Author SHA1 Message Date
atlas
032aa2e59a k8s-join: wait through a pull from a peer that fails first, and print the registry state when it keeps failing 2026-11-27 11:47:16 +01:00
atlas
2e1f037f25 require k8s: swarm services with a pod run in the cluster only 2026-11-27 11:47:16 +01:00
atlas
7819ed2dbd let a second machine join the main node's k3s and run pods from images only the main node holds 2026-11-27 11:47:16 +01:00
atlas
aab13d065f k8s-nats-switch: set the default namespace again after a switch restarts k3s 2026-11-27 11:47:16 +01:00
atlas
ff2bdea78d pin queue and poller state to per-service node labels instead of the hostname 2026-11-27 11:47:16 +01:00
atlas
58e59be65e vm-tests: k8s-bao-login expects the roles the module names
The test listed three jwt roles by hand, and the store has eight since the queue, stt, the review classifier and the claude minter joined, so it failed at the role assertion before it reached any pod. The list is now the module's own k8sPrincipals, sorted.
2026-11-27 11:47:16 +01:00
maia
c909777b63 k8s VM tests: wait for the store's active node after the unseal
The tests waited on `bao status`, which answers once the node is
unsealed and before raft has elected it, so the first policy write raced
the election and failed with "local node not active but active cluster
node not found". `unseal_bao` unseals and then waits for sys/leader to
say the node is the leader; the four tests that bootstrap the store use
it at both unseal sites.

Closes #6807
2026-11-27 11:47:16 +01:00
atlas
51565fdba6 k8s: the hyperhive namespace enforces pod security restricted
No pod in the namespace has a hostPort any more, and the census found nothing else that restricted refuses. The namespace now carries the restricted level for enforce, warn and audit, so the API server refuses a pod that drifts. The bao-login test's probe pods get the container security context restricted asks for. The controller switch test shows the API server admitting a compliant pod and refusing the same pod with a host port, a kept capability or privilege.
2026-11-27 11:47:16 +01:00
atlas
9752f30f36 k8s: the queue's client port is a loadbalancer service
The queue's client port was a hostPort on 0.0.0.0, which Pod Security baseline and restricted forbid. It is a LoadBalancer Service now, which k3s's service load balancer binds on every address of the node with a hostPort of its own in kube-system, so hives on other hosts keep their URL. No node port is allocated. The stt policy allows the load balancer's pods in place of the queue's, and the prune unit waits for them to go before the host unit starts. The egress published-port rule and the raw-table rules apply to the load balancer's hostPort as to the pod's.
2026-11-27 11:47:16 +01:00
atlas
0d857b8ae1 egress: the forward chain accepts the flows the host publishes for the agents
On a host with the egress intercept on, the forward chain rejected an agent's traffic to the queue once the queue ran as a pod: the pod's hostPort rewrites the destination to the pod, and the packet then leaves the bridge for the cluster. The chain now accepts TCP that the host's NAT redirected whose original destination is the bridge's address at a published port, which the queue adds when it runs in the cluster. Everything else from the bridge to the cluster stays refused. The nats switch test runs with the intercept on.
2026-11-27 11:47:15 +01:00
atlas
7ef9444e42 k8s: the queue's exporter is a ClusterIP service only the node reaches
The exporter's metrics port was a hostPort on the bridge's address, which Pod Security baseline and restricted forbid. It is a ClusterIP Service now, and the pod has a NetworkPolicy that admits the client port from any source and nothing else, so only the node reads the exporter, as the raw-table rules made it. The gateway's /metrics location dials the Service by name through nginx's resolver. The raw-table rules no longer name the exporter's port.
2026-11-27 11:46:56 +01:00
atlas
3cf89f25f1 k8s: the controller's listener is a ClusterIP service the host dials by name
The controller's api port was a hostPort on the node, which Pod Security baseline and restricted forbid. It is a ClusterIP Service now, behind a NetworkPolicy that admits only the node. The host's resolver (the hive's dnsmasq) forwards cluster.local to CoreDNS, and the gateway dials the Service by name through nginx's resolver. tcp.hostAddress goes.
2026-11-27 11:46:56 +01:00
atlas
4e60183bfa k8s: stt's pod runs in a user namespace of its own 2026-11-27 11:46:56 +01:00
atlas
02cc38d89e k8s: stt's pod gets a network policy: dns and four host ports out, nothing in 2026-11-27 11:46:56 +01:00
atlas
4ea3b0e10d k8s: the controller pod keeps no volume; the state gate goes 2026-11-27 11:46:56 +01:00
atlas
140ee7f38a k8s: the queue's pod mounts the host unit's store in place 2026-11-27 11:46:56 +01:00
atlas
a793df9708 k8s: stt and ci-metrics start without a state gate 2026-11-27 11:46:56 +01:00
atlas
e6326abd7e vm-tests: migrate status reports the state gate's answers 2026-11-27 11:46:56 +01:00
atlas
360454958a vm-tests: the state gate refuses an empty volume until the marker is written 2026-11-27 11:46:56 +01:00
atlas
3e1d3d0003 vm-tests: k8s-nats-switch moves the queue between its container and the cluster 2026-11-27 11:46:56 +01:00
atlas
713f866030 vm-tests: k8s-controller-switch moves the controller between its unit and the cluster 2026-11-27 11:46:56 +01:00
atlas
931ce8c016 vm-tests: k8s-runtime-switch moves the review classifier and the claude login minter with the router 2026-11-27 11:46:56 +01:00
atlas
9ca8a6eebf vm-tests: k8s-runtime-switch moves the CI run poller with the router and the speech-to-text service 2026-11-27 11:46:56 +01:00
atlas
eda01b8b1d k8s: a pod's requests are explicit, so its limits cap and reserve nothing 2026-11-27 11:46:56 +01:00
atlas
6665567826 vm-tests: k8s-runtime-switch moves the speech-to-text service with the router 2026-11-27 11:46:56 +01:00
atlas
371ddedef2 vm-tests: k8s-runtime-switch moves the router between its container and the cluster and back 2026-11-27 11:46:56 +01:00
atlas
15eccc1f3b vm-tests: k8s-bao-login runs a pod's ServiceAccount login against the real store 2026-11-27 11:46:56 +01:00
atlas
0461d8add8 vm-tests: a running collector keeps its cursor when it switches to the static user 2026-11-27 11:46:56 +01:00
atlas
ba0c41048e k8s: pod logs and metrics reach the hive collector 2026-11-27 11:46:56 +01:00
atlas
f7f298ff4f vm-tests: k8s-node pod reaches the hive bridge's listeners by swarm name 2026-11-27 11:46:56 +01:00
atlas
2cad6da060 vm-tests: k8s-node boots a node through deploy.k8s.enable 2026-11-27 11:46:56 +01:00
atlas
aaf11a0764 vm-tests: a k3s node harness, and the swarm images boot as pods 2026-11-27 11:46:55 +01:00
maia
df9cd8c7e6 archive: an empty prefix lists as no users, not as a failure
swarm-archive-users and hive-archive-backup read "No value found" on
stderr to tell a prefix that holds nothing from an error. With
`kv list -format=json`, bao answers such a prefix with status 2, `{}` on
stdout and nothing on stderr, so on a swarm whose archive has no users
yet the unit failed every 30 seconds forever, and every switch reported
it.

store_list, in the shared store helper, prints the names as a JSON array
and `[]` for a prefix that holds nothing: failed, empty stderr, stdout
`{}`. It is not decided on status 2 alone, which a refused token, a
sealed store and an unreachable store end with as well (their error is on
stderr). The two scripts use it. The script test runs it against a stub
that answers as bao does, with controls for a refusal, a sealed store and
a warning beside an empty answer, and the archive VM test's stub no
longer prints the table format's message for a JSON list. full-setup
waits for the users file to be rendered on a fresh swarm.

Closes #6840
2026-11-24 18:19:26 +01:00
maia
912b2d9570 swarm-otel: a timer starts the receiver-socket check again while it is failed
swarm-otel-sockets probes once at activation. On a fresh swarm the
collector opens its sockets only after authelia answers, which is after
the operator unseals the store, so the probe failed and stayed failed
after ingest worked: the only red unit on the swarm.

swarm-otel-sockets-recheck.timer now starts it again each minute, and
only while it is failed (an ExecCondition on systemctl is-failed), with
a restart that does not block. The check itself gets no Restart: a
oneshot's start job stays pending through an automatic restart, so a
switch would wait on it for as long as the collector is down, and the
failed check is what the switch reports. full-setup waits for the check
to be active after the collector has recovered, and the module-eval case
pins the timer, the condition and the absence of a Restart.

Closes #6836
2026-11-24 16:41:04 +01:00
atlas
870a0a6697 swarmctl bao init: save bao's raw output before parsing, and accept null key lists 2026-11-24 15:38:31 +01:00
atlas
cd040afa0e swarmctl login: find the sso provider from the gateway's published metadata 2026-11-23 23:19:45 +01:00
maia
dad288d555 swarm-otel, swarm-grafana: a delivery unit fails on no value yet
The collector's and Grafana's OIDC delivery units exited 0 when the store
held no value, so systemd did not retry them. On a fresh swarm authelia's
mint writes the secret about 30 s after the first read, and only the
refresh timer, ten minutes on, read it again. Both units now exit 75, and
the store retry they already carry asks every 30 s until the mint lands.

Closes #6790
2026-11-23 12:43:37 +01:00
atlas
480855dfaf swarm-otel: scrape the authenticated targets only once the collector has its client secret
An empty secret file made the prometheus receiver request a token for each published target every scrape; authelia's per-address limit then refused every client behind that address. Without a secret the collector starts on the config minus those jobs. full-setup asserts the limiter never fired.
2026-11-23 12:28:12 +01:00
maia
b8851743e8 egress: the forward chain refuses by default where the intercept is on
egress.forward defaults to reject while egress.intercept.enable is on (a
hive controller host turns it on) and to log otherwise, because reject
without the intercept would refuse all web traffic and an assertion
already forbids it. log stays an explicit choice.

The hive-squid VM test runs its log-mode half on the base node, so the
base pins forward = log at mkDefault priority and the reject
specialisation overrides it. A module-eval case covers the default on a
controller host, on a host without the intercept, and an explicit log.
2026-11-22 19:47:38 +01:00
atlas
58236e1b7f default the host's swarmctl to the gateway; login takes a callback port 2026-11-22 15:01:14 +01:00
damocles
36a8b4fa1f vm-tests: build a sample android app offline in the android-dev archetype 2026-11-22 13:25:29 +01:00
atlas
4a554fd6bf full-setup vm test: wait for the last created agent in the meta flake 2026-11-21 12:29:38 +01:00
maia
60af939514 swarm-archive vm test: check the no-key run died on the missing key, not is-active 2026-11-20 09:10:34 +01:00
atlas
5da6a7bbb8 egress vm test: an agent_allow element passes one MAC to one address and port under reject 2026-11-20 04:04:30 +01:00
maia
d9551415bf hive-egress: the lease hook's lines reach the journal at info under egress-lease
dnsmasq relays the hook's stderr at LOG_DEBUG as dnsmasq-script, and the
field log shipper's journald receiver keeps info and above, so no lease
add or renewal was visible in the field. The hook now also writes each
line to /dev/log at info priority with identifier egress-lease. The
stderr print stays. The VM test reads the lines back with
journalctl -t egress-lease -p info.
2026-11-20 02:04:37 +01:00
atlas
cead194b2a vm-tests: every test's globalTimeout stays under the one-hour job limit
full-setup 7200 -> 2400, semi-spread 10800 -> 3000, and 1800 on the four tests that used the driver's one-hour default. The runner kills a job at one hour and reports nothing, so a longer test timeout could never fire.
2026-11-19 21:55:34 +01:00
atlas
2fd1b7b61a antispoof vm test: match the spoof chain's verdict with its counter stats, scope link-local binds, run the receiver by store path 2026-11-19 21:50:37 +01:00
atlas
16260108ee hive-squid vm test: wait for squid's reload before probing, and count a refusal only with its log line 2026-11-19 19:42:29 +01:00
atlas
0370076463 semi-spread vm test: a controller journal entry with no message cannot crash the settle loop 2026-11-19 14:27:59 +01:00
atlas
9e04477ec7 squid vm test: derive the relay's source address from the agent's, and assert a no-lease source is refused, never forwarded 2026-11-19 14:05:02 +01:00