Merge pull request #97692 from ryneeverett/lockkernelmodules-lxd
This commit is contained in:
commit
26b3751de7
@ -175,5 +175,8 @@ in {
|
||||
"net.ipv6.neigh.default.gc_thresh3" = 8192;
|
||||
"kernel.keys.maxkeys" = 2000;
|
||||
};
|
||||
|
||||
boot.kernelModules = [ "veth" "xt_comment" "xt_CHECKSUM" "xt_MASQUERADE" ]
|
||||
++ optionals (!config.networking.nftables.enable) [ "iptable_mangle" ];
|
||||
};
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ in {
|
||||
## limits.cpu ##
|
||||
|
||||
machine.succeed("lxc config set test limits.cpu 1")
|
||||
machine.succeed("lxc restart test")
|
||||
|
||||
# Since Alpine doesn't have `nproc` pre-installed, we've gotta resort
|
||||
# to the primal methods
|
||||
@ -105,6 +106,7 @@ in {
|
||||
)
|
||||
|
||||
machine.succeed("lxc config set test limits.cpu 2")
|
||||
machine.succeed("lxc restart test")
|
||||
|
||||
assert (
|
||||
"2"
|
||||
@ -115,6 +117,7 @@ in {
|
||||
## limits.memory ##
|
||||
|
||||
machine.succeed("lxc config set test limits.memory 64MB")
|
||||
machine.succeed("lxc restart test")
|
||||
|
||||
assert (
|
||||
"MemTotal: 62500 kB"
|
||||
@ -122,6 +125,7 @@ in {
|
||||
)
|
||||
|
||||
machine.succeed("lxc config set test limits.memory 128MB")
|
||||
machine.succeed("lxc restart test")
|
||||
|
||||
assert (
|
||||
"MemTotal: 125000 kB"
|
||||
|
@ -7,6 +7,7 @@
|
||||
, bash
|
||||
, installShellFiles
|
||||
, nftablesSupport ? false
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
let
|
||||
@ -58,6 +59,8 @@ buildGoPackage rec {
|
||||
installShellCompletion --bash --name lxd go/src/github.com/lxc/lxd/scripts/bash/lxd-client
|
||||
'';
|
||||
|
||||
passthru.tests.lxd = nixosTests.lxd;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles pkg-config makeWrapper ];
|
||||
buildInputs = [ lxc acl libcap dqlite.dev raft-canonical.dev
|
||||
sqlite-replication udev.dev ];
|
||||
|
Loading…
Reference in New Issue
Block a user