nixpkgs/nixos/modules/tasks
Franz Pletz 76a3c30471
network-interfaces service: fix bindsTo deps for masters
Previously, netdev units for network interfaces defined in the nixos
configurations would bindTo the systemd device unit of the interface if
not in a container.

In situations where you switch to a new nixos configration with changes
to network-setup.service (like nameservers) and have stacked interfaces
like vlans on a bond, it would fail to propagate restarts to the netdevs
correctly resulting with broken networking. The bond would be present
but no vlan interfaces rendering the machine unreachable.

My fear is that the udev events fail to propagate correctly while a systemd
transaction that is also restarting the triggered netdev service is running.
This commit changes this behaviour so netdev services bindTo other netdev
services if present and otherwise fall back to the previous behaviour.

We also noticed that stacked interfaces would sometimes seemingly be stopped
in the wrong order. For instance in the above example, the bond interface
would be deleted before the vlan interfaces resulting in the vlan interfaces
not being present when their service is being stopped. This would cause the
systemd transaction to fail and thus break networking. Their postStop hooks
are now allowed to fail as we have reached the desired state.
2017-02-13 01:57:25 +01:00
..
filesystems nfs service: create state directories 2017-02-05 03:17:38 +03:00
bcache.nix nixos: move bcache udev rule in a new bcache.nix module 2014-11-10 22:19:43 +01:00
cpu-freq.nix nixos/cpu-freq: list correct default governor in description 2016-08-28 17:14:37 -05:00
encrypted-devices.nix nixos: apply toposort to fileSystems to support bind and move mounts 2016-08-23 18:14:05 +00:00
filesystems.nix filesystems: add support to mount glusterfs 2017-02-02 23:16:52 +01:00
kbd.nix kbd service: don't restart systemd-vconsole-setup 2017-02-08 21:50:33 +03:00
lvm.nix
network-interfaces-scripted.nix network-interfaces service: fix bindsTo deps for masters 2017-02-13 01:57:25 +01:00
network-interfaces-systemd.nix nixos/networkd: Fix eval error for defaultGateway 2017-02-07 07:05:31 +01:00
network-interfaces.nix network-interfaces service: add metric option for defaultGateways 2017-02-11 04:53:56 +01:00
scsi-link-power-management.nix nixos: set scsi link power policy using udev 2015-10-25 19:38:53 +01:00
swraid.nix sw-raid: rename mdadmShutdown 2016-03-09 21:06:27 +03:00
trackpoint.nix trackpoint: fix typo in configuration description 2016-01-11 04:12:04 +00:00
tty-backgrounds-combine.sh Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00