containers reach network-online only with a dhcp lease, and bao users wait for it
This commit is contained in:
parent
04f8683f99
commit
81a57a9f81
1 changed files with 77 additions and 3 deletions
|
|
@ -295,6 +295,31 @@ let
|
|||
&& !(sc.DynamicUser or false)
|
||||
&& swarmServicesHere.services.hyperhive.deploy.nats.enable;
|
||||
}
|
||||
{
|
||||
# dhcpcd without IPv4LL, waiting for IPv4: `network-online` is a lease.
|
||||
# The router sets no `nohook` itself and authelia does; `nohook` is the
|
||||
# control that the lookup finds `extraConfig`. The queue shares the host
|
||||
# netns and keeps the default.
|
||||
name = "private-netns service containers wait for a DHCP lease and the forwarder fetch waits for it";
|
||||
ok =
|
||||
let
|
||||
cfgOf = name: swarmServicesHere.containers.${name}.config;
|
||||
leased =
|
||||
name:
|
||||
let
|
||||
d = (cfgOf name).networking.dhcpcd;
|
||||
in
|
||||
lib.hasInfix "noipv4ll" d.extraConfig && d.wait == "ipv4";
|
||||
fetch = (cfgOf "swarm-builder").systemd.services.swarm-journal-forwarder-oidc;
|
||||
in
|
||||
leased "swarm-notify-router"
|
||||
&& leased "swarm-authelia"
|
||||
&& lib.hasInfix "nohook resolv.conf" (cfgOf "swarm-authelia").networking.dhcpcd.extraConfig
|
||||
&& !(lib.hasInfix "noipv4ll" (cfgOf "swarm-nats").networking.dhcpcd.extraConfig)
|
||||
&& (cfgOf "swarm-nats").networking.dhcpcd.wait == "any"
|
||||
&& lib.elem "network-online.target" fetch.after
|
||||
&& lib.elem "network-online.target" fetch.wants;
|
||||
}
|
||||
{
|
||||
name = "the notification router stays off where the shared services are hosted without the store";
|
||||
ok =
|
||||
|
|
|
|||
Loading…
Reference in a new issue