networking: Fix timeout when `lo` has aliased IPs
With a config like
{
networking.interfaces."lo".ip4 = [
{ address = "10.8.8.8"; prefixLength = 32; }
];
}
a nixos-rebuild switch would take a long time, and you'd see:
$ systemctl list-jobs
JOB UNIT TYPE STATE
734400 network-interfaces.target start waiting
734450 sys-subsystem-net-devices-lo.device start running
734449 network-link-lo.service start waiting
and:
systemd[1]: sys-subsystem-net-devices-lo.device: Job sys-subsystem-net-devices-lo.device/star>
systemd[1]: sys-subsystem-net-devices-lo.device: Job sys-subsystem-net-devices-lo.device/star>
systemd[1]: Timed out waiting for device sys-subsystem-net-devices-lo.device.
This removes the device dependency for `lo` and fixes this bug.
Closes #7227
commit48d292e8a14bec3926dc3963e167859b35fc60af
authorGraham Christensen <graham@grahamc.com>
dateFri 6 Jul 2018, 15:33 (8 years ago)
parent29021ea
nixos/modules/tasks/network-interfaces.nix+1−1
@@ -1053,7 +1053,7 @@ in
10531053 };
10541054 } // (listToAttrs (flip map interfaces (i:
10551055 let
1056− deviceDependency = if config.boot.isContainer
1056+ deviceDependency = if (config.boot.isContainer || i.name == "lo")
10571057 then []
10581058 else [ (subsystemDevice i.name) ];
10591059 in