Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.11] incus: 6.8.0 -> 6.9.0 #376767

Merged
merged 2 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions nixos/tests/incus/incus-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -244,22 +244,22 @@ import ../make-test-python.nix (

with subtest("container CPU limits can be managed"):
set_config(f"container-{variant}1", "limits.cpu 1", restart=True)
wait_incus_exec_success(f"container-{variant}1", "nproc | grep '^1$'", timeout=15)
wait_incus_exec_success(f"container-{variant}1", "nproc | grep '^1$'", timeout=90)


with subtest("container CPU limits can be hotplug changed"):
set_config(f"container-{variant}1", "limits.cpu 2")
wait_incus_exec_success(f"container-{variant}1", "nproc | grep '^2$'", timeout=15)
wait_incus_exec_success(f"container-{variant}1", "nproc | grep '^2$'", timeout=90)


with subtest("container memory limits can be managed"):
set_config(f"container-{variant}1", "limits.memory 128MB", restart=True)
wait_incus_exec_success(f"container-{variant}1", "grep 'MemTotal:[[:space:]]*125000 kB' /proc/meminfo", timeout=15)
wait_incus_exec_success(f"container-{variant}1", "grep 'MemTotal:[[:space:]]*125000 kB' /proc/meminfo", timeout=90)


with subtest("container memory limits can be hotplug changed"):
set_config(f"container-{variant}1", "limits.memory 256MB")
wait_incus_exec_success(f"container-{variant}1", "grep 'MemTotal:[[:space:]]*250000 kB' /proc/meminfo", timeout=15)
wait_incus_exec_success(f"container-{variant}1", "grep 'MemTotal:[[:space:]]*250000 kB' /proc/meminfo", timeout=90)


with subtest("container software tpm can be configured"):
Expand Down Expand Up @@ -373,7 +373,7 @@ import ../make-test-python.nix (

with subtest("virtual-machine CPU limits can be hotplug changed"):
set_config(f"vm-{variant}1", "limits.cpu 2")
wait_incus_exec_success(f"vm-{variant}1", "nproc | grep '^2$'", timeout=15)
wait_incus_exec_success(f"vm-{variant}1", "nproc | grep '^2$'", timeout=90)


with subtest("virtual-machine can successfully restart"):
Expand Down
10 changes: 5 additions & 5 deletions pkgs/by-name/in/incus/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
hash,
lts ? false,
patches ? [ ],
updateScriptArgs ? "",
nixUpdateExtraArgs ? [ ],
vendorHash,
version,
}:
Expand All @@ -12,7 +12,6 @@
lib,
buildGoModule,
fetchFromGitHub,
writeScript,
acl,
cowsql,
libcap,
Expand All @@ -21,6 +20,7 @@
sqlite,
udev,
installShellFiles,
nix-update-script,
nixosTests,
}:

Expand Down Expand Up @@ -128,9 +128,9 @@ buildGoModule rec {

ui = callPackage ./ui.nix { };

updateScript = writeScript "ovs-update.py" ''
${./update.py} ${updateScriptArgs}
'';
updateScript = nix-update-script {
extraArgs = nixUpdateExtraArgs;
};
};

meta = {
Expand Down
5 changes: 4 additions & 1 deletion pkgs/by-name/in/incus/lts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ import ./generic.nix {
./0c37b7e3ec65b4d0e166e2127d9f1835320165b8.patch
];
lts = true;
updateScriptArgs = "--lts --regex '6.0.*'";
nixUpdateExtraArgs = [
"--version-regex=^v(6\\.0\\.[0-9]+)$"
"--override-filename=pkgs/by-name/in/incus/lts.nix"
];
}
9 changes: 6 additions & 3 deletions pkgs/by-name/in/incus/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import ./generic.nix {
hash = "sha256-Ir+cT+2xA+L4kBXhwA0XXE/D8zjMPGYiwW0VrEdobZ4=";
version = "6.8.0";
vendorHash = "sha256-CDLq41AB2Y9nYlTuXZaAOgwXIin9CbqSXCFoigsc14A=";
hash = "sha256-bi++GJLLYlX8JZwmxx4S2EGALuwVOGW4G7u2Nv6s26k=";
version = "6.9.0";
vendorHash = "sha256-aYQOKO5RMPqChV6hXPBfSLKdfCuS+BFVmpakJX7swKg=";
patches = [ ];
nixUpdateExtraArgs = [
"--override-filename=pkgs/by-name/in/incus/package.nix"
];
}
86 changes: 0 additions & 86 deletions pkgs/by-name/in/incus/update.py

This file was deleted.

Loading