From 178326596d8708d6f3bb6dfa6308c7af427b0b3e Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 7 Nov 2022 16:04:07 +0100 Subject: [PATCH] cgroup: add note w.r.t. adding new params to change_cpu_shares Signed-off-by: Thomas Lamprecht --- src/PVE/CGroup.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PVE/CGroup.pm b/src/PVE/CGroup.pm index 2114c25..7a83ff8 100644 --- a/src/PVE/CGroup.pm +++ b/src/PVE/CGroup.pm @@ -517,6 +517,10 @@ sub clamp_cpu_shares { # It is left to the user to figure this out for now. # # Dies on error (including a not-running or currently-shutting-down guest). +# +# NOTE: if you add a new param during 7.x you need to break older pve-container/qemu-server versions +# that previously passed a `$cgroupv1_default`, which got removed due to being ignored anyway. +# otherwise you risk that a old module bogusly passes some cgroup default as your new param. sub change_cpu_shares { my ($self, $shares) = @_; -- 2.39.2