Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/nix/vm-tests
Author SHA1 Message Date
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
atlas
7c2f7443fb semi-spread: wait for the pushed repo, bound the settle, name swarm faults
The test created its agents 0.5 s after pushing hyperhive/hyperhive, while
the forge still read the repo as empty, so the create's update_meta failed
and the next try came on the controller's 10-minute round. It now waits for
the two forge reads update_meta makes.

settle_hive_agents waited 3600 s, the CI job's own limit, so a stall was
killed rather than reported. It now waits 1200 s and also stops on a swarm
fault: a build the builder did not push to the cache, or an update_meta or
build_meta failure no later round got past. Timeouts and faults dump the
swarm builder's journal from heavyduty too.

Refs #6627
2026-11-19 12:25:39 +01:00
atlas
70a8ef77a7 squid vm test: the web node's nginx serves its certificate with addSSL 2026-11-19 12:25:07 +01:00
atlas
891a1cd5b1 antispoof vm test: nft is on the host's PATH 2026-11-19 12:24:44 +01:00
atlas
c78d73ccd1 ephemeral-rootfs vm test: the drop-in runs the check from /run/hive-rootfs-check 2026-11-19 10:59:45 +01:00
atlas
adc61c9043 remove the swarm wireguard mesh; tombstone its options 2026-11-15 02:17:44 +01:00
atlas
fbfc6f392a egress anti-spoof: the vm test pins drop under the new option path 2026-11-15 01:43:50 +01:00
atlas
a812e4dd21 egress anti-spoof: the vm test names drop as explicit, and the log default waits for the stale-delete lines 2026-11-15 01:43:50 +01:00
damocles
7468aa4cff nix: move the egress firewall options under deploy.hive-controller.egress 2026-11-15 01:22:35 +01:00
atlas
1cef99e992 egress anti-spoof: renewals from the leased address pass, a stale lease delete is skipped 2026-11-15 01:20:41 +01:00
atlas
60aede950b egress anti-spoof: drop by default again 2026-11-14 13:27:13 +01:00
atlas
723ce866f1 archive: push restic backup and prune metrics, and add a backups dashboard 2026-11-14 11:08:57 +01:00
atlas
5189e8fb4b egress: refresh a leased pair on dhcp renewal and default anti-spoof to log
dnsmasq runs the dhcp-script on a renewal only with script-on-renewal, so a pair loaded at the first lease timed out while the lease kept renewing and the bridge table dropped the container's traffic. Set script-on-renewal, time pairs out remaining + 300s, default antiSpoof to log, and run the vm test through renewals with drop.
2026-11-13 23:55:12 +01:00
atlas
dad15ca855 egress: forward = reject for intercepted agents, direct_mac exempt in log mode too 2026-11-13 13:00:13 +01:00
atlas
dff662c6b3 refuse tls hellos that carry encrypted client hello before squid sees them 2026-11-13 12:56:58 +01:00
atlas
de43dac33c ci: type-check the semi-spread and swarm-builder-offline test scripts with stand-in values 2026-11-13 11:00:04 +01:00
atlas
a401b0c8ef vm tests: stop hive-squid binding journal to both a string and a function 2026-11-13 10:59:30 +01:00
atlas
712dcf2b25 squid intercepts restricted and log agents' web traffic, named from the bound source address 2026-11-13 09:47:09 +01:00
atlas
df02ff89aa vm tests: fail on a missing log port, give up early on a broken hive 2026-11-13 09:04:09 +01:00
atlas
70179b6c1f egress anti-spoofing: keep established bindings, load tables with bindings and leases in one transaction 2026-11-13 08:53:23 +01:00
atlas
c4ac01ef88 agent bridge: drop frames whose source MAC or address isn't the container's own (egress.antiSpoof) 2026-11-13 08:53:23 +01:00
atlas
bd79b58e78 log the agent bridge's forwarded flows in the hive_egress table
A forward chain in the hive-owned nft table logs each new flow from the agent bridge to the uplink (v4 and v6) and counts every packet. It never blocks. The mesh interface is skipped. Logging is rate limited per source address; a flow that limit cannot log gets one line from a shared limit with its own prefix. services.hyperhive.network.egress.forward selects accept, log (default) or drop; drop is refused at evaluation until the interception it needs exists.
2026-11-12 09:20:51 +01:00
atlas
a95fdc6281 full-setup vm test: a failed create also dumps the swarm queue's nats and auth units 2026-11-12 07:42:11 +01:00
atlas
8fbb3c65fd semi-spread vm test: the merged swarm machine keeps attic private, like heavyduty 2026-11-12 07:41:50 +01:00
atlas
2a0b2dcc1f swarm-archive vm test: the fake store is readable by the prune whatever the writer's umask 2026-11-12 04:24:44 +01:00
atlas
c1c5fe9704 vm-tests: full-setup script lives in full-setup.py, build-time values in env, ruff in ci 2026-11-11 22:35:54 +01:00
atlas
eb39a90057 load the agent-bridge to loopback drop in its own nft table 2026-11-11 16:54:07 +01:00
atlas
26152161ca semi-spread vm test: bao on the store machine uses the operator leaf 2026-11-11 10:10:18 +01:00
atlas
ea1564fba7 hive-squid test: wait for the agent, retry no-answer connects, print evidence on failure 2026-11-11 10:08:19 +01:00
atlas
fa07f32cdf semi-spread test: bao on the store host presents a client certificate 2026-11-11 09:07:00 +01:00
atlas
2ef62a3cc8 swarm-archive vm test: the forget control picks a snapshot to delete and reads the refusal 2026-11-11 09:06:35 +01:00
atlas
bcd698eb43 vm-tests: semi-spread, the example on three machines and an outside client 2026-11-11 00:14:24 +01:00
atlas
1ad4ebdd7b vm-tests: factor the agent toplevels out of full-setup 2026-11-11 00:14:24 +01:00