Watch
0
0
Fork
You've already forked hyperhive
0

tmpfiles creates the agents root owned by hive-core

a fresh host's hive-priv made /var/lib/hyperhive/agents root-owned, so
hive-c0re could not create agent dirs (nightly run #7113). the rule
names no mode, so existing hosts are unchanged.

Closes #6143
This commit is contained in:
atlas 2026-11-06 20:30:17 +01:00
commit f1f611ba01

View file

@ -807,6 +807,16 @@ let
&& hive.extraConfig == gw.lib.securityHeaders
&& hive.locations ? "/";
}
{
# hive-priv creates the agents root as root on a host with no agents yet,
# and hive-c0re (hive-core) then cannot make `agents/<name>`. The rule
# names no mode, so a host that has the dir keeps its mode. The second
# arm needs the first: a host with the controller off has no such rule.
name = "the agents root is created hive-core-owned with the mode left to the default";
ok =
lib.elem "d /var/lib/hyperhive/agents - hive-core hive-core -" allLocal.systemd.tmpfiles.rules
&& !(lib.any (lib.hasInfix "/var/lib/hyperhive/agents") centralToggleOff.systemd.tmpfiles.rules);
}
{
# The file held bcrypt hashes at 0644; a host carrying one from before
# gets it deleted, and nothing names it for nginx.