1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-12 03:51:04 +01:00

Implement resource-management experimental feature

Adds basic resource tracking to system features used by distributed
builds, similar to resource management in job schedulers like Slurm.

Includes a positive and negative functional test and a documentation
update to the distributed builds section.

Resolves #2307

Signed-off-by: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>
This commit is contained in:
Lisanna 2025-11-03 15:41:52 -05:00
parent 5390bba920
commit 1b69645641
12 changed files with 261 additions and 15 deletions

View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
source common.sh
enableFeatures "resource-management"
requireSandboxSupport
[[ $busybox =~ busybox ]] || skipTest "no busybox"
here=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
export NIX_USER_CONF_FILES=$here/config/nix-with-resource-management.conf
expectStderr 1 nix build -Lvf resource-management.nix \
--arg busybox "$busybox" \
--out-link "$TEST_ROOT/result-from-remote" \
--store "$TEST_ROOT/local" \
--builders "ssh-ng://localhost?system-features=testf - - 4 1 testf:1" \
| grepQuiet "Failed to find a machine for remote build!"