The old boot.spl.hostid option was not working correctly due to an
upstream bug.
Instead, now we will create the /etc/hostid file so that all applications
(including the ZFS kernel modules, ZFS user-space applications and other
unrelated programs) pick-up the same system-wide host id. Note that glibc
(and by extension, the `hostid` program) also respect the host id configured in
/etc/hostid, if it exists.
The hostid option is now mandatory when using ZFS because otherwise, ZFS will
require you to force-import your ZFS pools if you want to use them, which is
undesirable because it disables some of the checks that ZFS does to make sure it
is safe to import a ZFS pool.
The /etc/hostid file must also exist when booting the initrd, before the SPL
kernel module is loaded, so that ZFS picks up the hostid correctly.
The complexity in creating the /etc/hostid file is due to having to
write the host ID as a 32-bit binary value, taking into account the
endianness of the machine, while using only shell commands and/or simple
utilities (to avoid exploding the size of the initrd).
3.16.0 introduced a regression where vlan and veth devices could not be
created due to a check in the code for existing devices. This applies
the upstream patch which fixes the issue.
Additionally, this corrects the nixos network-interfaces task which now
needs to specify the name parameter when adding links.
Within the module it's referenced with an uppercase "P" and ipv6Address
also begins with an uppercase "A" after the "6", so let's make it
consistent.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Currently, nixos will allow for interface names with special characters
such as the hyphen to be used. This presents a problem when using
systemd device names as the namespace paths are separated using hyphens.
Within systemd, if a device name has a hyphen it should be replaced with
the escape sequence \x2d.
This patch sanitizes all interface names before they are used in a
systemd device string.
Currently, device units are named directly after the name the user
specifies for the device. A bridge device named lan will be defined
within lan.service. This becomes a problem if you want your interface
named nginx but also want to run the nginx service.
This patch fixes the issue by appending netdev to all virtually created
network device units. Therefore, the lan bridge -> lan-netdev.service.
This naming convention is used for all types of network devices in order
to ensure that all network devices are unique.
Previously, we had no method for creating 6-to-4 tunneled interfaces.
This patch adds the option networking.sits, which allows the user to
create named 6-to-4 sit devices.
This used to work with systemd-nspawn 203, because it bind-mounted
/etc/resolv.conf (so openresolv couldn't overwrite it). Now it's just
copied, so we need some special handling.
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
This patch adds support for the creations of new bond devices, aggregate
pipes of physical devices for extra throughput or failover.
Additionally, add better correction at the startup of a bridge
of vlan interface (delete old, stale interfaces).