diff --git a/deploy/deploy-test-server.sh b/deploy/deploy-test-server.sh index ca80751..ff92dca 100755 --- a/deploy/deploy-test-server.sh +++ b/deploy/deploy-test-server.sh @@ -142,7 +142,13 @@ $sudo_cmd cp /opt/left4me/deploy/files/usr/local/lib/systemd/system/l4d2-build.s # CPU isolation via cgroup-v2 AllowedCPUs= drop-ins. Pin everything that # isn't a live game server to core 0; give game servers cores 1..N-1. # See docs/superpowers/specs/2026-05-09-l4d2-cpu-isolation-design.md. -NPROC=$(nproc) +# `nproc --all` reports installed processors regardless of the calling +# shell's CPU affinity. Plain `nproc` honors Cpus_allowed of the calling +# process, so on a host that already has the cpuset drop-ins applied +# (system.slice → AllowedCPUs=0), the SSH login lands in user.slice with +# AllowedCPUs=0 and `nproc` would return 1 — making subsequent deploys +# wrongly think they're on a single-core box and skip CPU isolation. +NPROC=$(nproc --all) SYSTEM_CPUS=${LEFT4ME_SYSTEM_CPUS:-0} if [ "${LEFT4ME_GAME_CPUS+x}" = x ]; then GAME_CPUS=$LEFT4ME_GAME_CPUS diff --git a/l4d2host/pyproject.toml b/l4d2host/pyproject.toml index c12b4a0..574cbea 100644 --- a/l4d2host/pyproject.toml +++ b/l4d2host/pyproject.toml @@ -17,7 +17,7 @@ dependencies = [ l4d2ctl = "l4d2host.cli:app" [tool.setuptools] -packages = ["l4d2host", "l4d2host.fs"] +packages = ["l4d2host"] [tool.setuptools.package-dir] l4d2host = "."