Watch
0
0
Fork
You've already forked hyperhive
0

count the cache's container in the service-container cases

This commit is contained in:
atlas 2026-10-27 14:28:51 +01:00
commit e77459d2cb

View file

@ -642,21 +642,21 @@ let
# that lost a container can't pass by comparing fewer of them. # that lost a container can't pass by comparing fewer of them.
name = "every service container restates its host-side privateNetwork"; name = "every service container restates its host-side privateNetwork";
ok = ok =
lib.length (lib.attrNames serviceContainers) == 14 lib.length (lib.attrNames serviceContainers) == 15
&& lib.all ( && lib.all (
c: c.privateNetwork == (c.config.services.hyperhive.swarmContainer.privateNetwork or null) c: c.privateNetwork == (c.config.services.hyperhive.swarmContainer.privateNetwork or null)
) (lib.attrValues serviceContainers); ) (lib.attrValues serviceContainers);
} }
{ {
# Both values come from ../container-modules/swarm-container.nix. # Both values come from ../container-modules/swarm-container.nix.
# Four of the 14 service containers share the host netns (hive-forge, bao, # Five of the 15 service containers share the host netns (hive-forge, bao,
# the queue, the log store) and ten have one of their own. # the queue, the log store, the cache) and ten have one of their own.
name = "a service container on the host netns runs no firewall or resolvconf of its own"; name = "a service container on the host netns runs no firewall or resolvconf of its own";
ok = ok =
let let
shared = lib.filter (c: !c.privateNetwork) (lib.attrValues serviceContainers); shared = lib.filter (c: !c.privateNetwork) (lib.attrValues serviceContainers);
in in
lib.length shared == 4 lib.length shared == 5
&& lib.all ( && lib.all (
c: !c.config.networking.firewall.enable && !c.config.networking.resolvconf.enable c: !c.config.networking.firewall.enable && !c.config.networking.resolvconf.enable
) shared; ) shared;