summary refs log tree commit diff
path: root/nixos/tests/all-tests.nix
diff options
context:
space:
mode:
authorPatryk Wychowaniec <wychowaniec.patryk@gmail.com>2021-02-26 17:14:08 +0100
committerPatryk Wychowaniec <wychowaniec.patryk@gmail.com>2021-02-26 17:48:49 +0100
commit336ef2de99197dd9c07b302685dc9e6282fa5b55 (patch)
tree37c3eb96823750ef2dd985c3ab8862c2bb5f91cb /nixos/tests/all-tests.nix
parent5f1345a30318cf9559e58576dff8c5d3e4d77a62 (diff)
downloadnixpkgs-336ef2de99197dd9c07b302685dc9e6282fa5b55.tar
nixpkgs-336ef2de99197dd9c07b302685dc9e6282fa5b55.tar.gz
nixpkgs-336ef2de99197dd9c07b302685dc9e6282fa5b55.tar.bz2
nixpkgs-336ef2de99197dd9c07b302685dc9e6282fa5b55.tar.lz
nixpkgs-336ef2de99197dd9c07b302685dc9e6282fa5b55.tar.xz
nixpkgs-336ef2de99197dd9c07b302685dc9e6282fa5b55.tar.zst
nixpkgs-336ef2de99197dd9c07b302685dc9e6282fa5b55.zip
nixos/containers: allow containers with long names to create private networks
Launching a container with a private network requires creating a
dedicated networking interface for it; name of that interface is derived
from the container name itself - e.g. a container named `foo` gets
attached to an interface named `ve-foo`.

An interface name can span up to IFNAMSIZ characters, which means that a
container name must contain at most IFNAMSIZ - 3 - 1 = 11 characters;
it's a limit that we validate using a build-time assertion.

This limit has been upgraded with Linux 5.8, as it allows for an
interface to contain a so-called altname, which can be much longer,
while remaining treated as a first-class citizen.

Since altnames have been supported natively by systemd for a while now,
due diligence on our side ends with dropping the name-assertion on newer
kernels.

This commit closes #38509.

systemd/systemd#14467
systemd/systemd#17220
https://lwn.net/Articles/794289/
Diffstat (limited to 'nixos/tests/all-tests.nix')
-rw-r--r--nixos/tests/all-tests.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index bf094dbe984..02723f88c31 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -72,6 +72,7 @@ in
   containers-imperative = handleTest ./containers-imperative.nix {};
   containers-ip = handleTest ./containers-ip.nix {};
   containers-macvlans = handleTest ./containers-macvlans.nix {};
+  containers-names = handleTest ./containers-names.nix {};
   containers-physical_interfaces = handleTest ./containers-physical_interfaces.nix {};
   containers-portforward = handleTest ./containers-portforward.nix {};
   containers-reloadable = handleTest ./containers-reloadable.nix {};