Watch
0
0
Fork
You've already forked hyperhive
0

containers reach network-online only with a dhcp lease, and bao users wait for it

This commit is contained in:
atlas 2026-11-01 11:06:41 +01:00
commit 81a57a9f81
2 changed files with 77 additions and 3 deletions

View file

@ -45,6 +45,13 @@ in
(lib.mkIf (!cfg.privateNetwork) {
networking.firewall.enable = false;
})
# A private-netns container with an interface takes its address from the
# hive's DHCP. dhcpcd counts an IPv4LL address as an address, so without
# these `network-online.target` is reached on 169.254.x before the lease.
(lib.mkIf cfg.privateNetwork {
networking.dhcpcd.extraConfig = "noipv4ll";
networking.dhcpcd.wait = "ipv4";
})
(lib.mkIf cfg.writesOwnResolvConf {
networking.resolvconf.enable = lib.mkForce false;
})

View file

@ -285,6 +285,8 @@ in
# (../host-modules/lib/store-retry.nix), and a collector that restarts until the file lands.
systemd.services.${fetchUnit} = lib.mkIf fetchesHere {
description = "fetch this container's journal forwarder OIDC client secret from the swarm secret store";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
before = [ "opentelemetry-collector.service" ];
path = [