mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 12:15:34 +03:00
nixos-container: force systemd-nspawn to use unified cgroups hierarchy
This commit is contained in:
parent
b0bce6ae73
commit
12508ac79a
4 changed files with 25 additions and 0 deletions
21
nixos/tests/containers-unified-hierarchy.nix
Normal file
21
nixos/tests/containers-unified-hierarchy.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
name = "containers-unified-hierarchy";
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ farnoy ];
|
||||
};
|
||||
|
||||
nodes.machine = { ... }: {
|
||||
containers = {
|
||||
test-container = {
|
||||
autoStart = true;
|
||||
config = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("default.target")
|
||||
|
||||
machine.succeed("echo 'stat -fc %T /sys/fs/cgroup/ | grep cgroup2fs' | nixos-container root-login test-container")
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue