diff options
author | Graham Christensen <graham@grahamc.com> | 2018-07-06 15:33:05 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2018-07-06 15:38:52 -0400 |
commit | 48d292e8a14bec3926dc3963e167859b35fc60af (patch) | |
tree | 3bf5ed593439439bdca7355f84afaf831eee48d2 /nixos/modules/tasks/network-interfaces.nix | |
parent | 29021eab6afcd44791cef283296aeec476dde6c2 (diff) |
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
Diffstat (limited to 'nixos/modules/tasks/network-interfaces.nix')
-rw-r--r-- | nixos/modules/tasks/network-interfaces.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index a3534e10bb17..7053aa57f803 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -1053,7 +1053,7 @@ in }; } // (listToAttrs (flip map interfaces (i: let - deviceDependency = if config.boot.isContainer + deviceDependency = if (config.boot.isContainer || i.name == "lo") then [] else [ (subsystemDevice i.name) ]; in |