From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id ECBF11FF16F for ; Thu, 19 Dec 2024 17:03:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E3CCBC08E; Thu, 19 Dec 2024 17:03:43 +0100 (CET) From: Daniel Kral To: f.gruenbichler@proxmox.com Date: Thu, 19 Dec 2024 17:03:34 +0100 Message-Id: <20241219160334.184330-1-d.kral@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240416122054.733817-7-f.gruenbichler@proxmox.com> References: <20240416122054.733817-7-f.gruenbichler@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.004 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v2 container 5/7] hotplug: handle pool limits X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Cc: pve-devel@lists.proxmox.com Content-Type: multipart/mixed; boundary="===============0257470496060116701==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============0257470496060116701== Content-Transfer-Encoding: quoted-printable On 16/04/2024 14:20, Fabian Gr=C3=BCnbichler wrote:=0D > by checking the new values against the running limits.=0D > =0D > Signed-off-by: Fabian Gr=C3=BCnbichler =0D > ---=0D > src/PVE/LXC/Config.pm | 13 +++++++++++++=0D > 1 file changed, 13 insertions(+)=0D > =0D > diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm=0D > index a6baccd..248100e 100644=0D > --- a/src/PVE/LXC/Config.pm=0D > +++ b/src/PVE/LXC/Config.pm=0D > @@ -1434,6 +1434,13 @@ sub vmconfig_hotplug_pending {=0D > =0D > foreach my $opt (sort keys %{$conf->{pending}}) { # add/change=0D > next if $selection && !$selection->{$opt};=0D > + if ($opt eq 'cores') {=0D > + PVE::GuestHelpers::check_guest_pool_limit($vmid, {=0D > + running =3D> 1,=0D > + absolute =3D> 1,=0D > + cpu =3D> $conf->{pending}->{cores},=0D > + })=0D =0D This seems to run fine, but shouldn't there be a semicolon?=0D =0D > + }=0D > if ($LXC_FASTPLUG_OPTIONS->{$opt}) {=0D > $conf->{$opt} =3D delete $conf->{pending}->{$opt};=0D > }=0D > @@ -1447,6 +1454,12 @@ sub vmconfig_hotplug_pending {=0D > my $hotplug_memory =3D sub {=0D > my ($new_memory, $new_swap) =3D @_;=0D > =0D > + PVE::GuestHelpers::check_guest_pool_limit($vmid, {=0D > + running =3D> 1,=0D > + absolute =3D> 1,=0D > + mem =3D> ($new_memory + $new_swap)*1024*1024,=0D > + });=0D > +=0D > ($new_memory, my $new_memory_high) =3D calculate_memory_constraints($ne= w_memory);=0D > $new_swap =3D int($new_swap * 1024 * 1024) if defined($new_swap);=0D > $cgroup->change_memory_limit($new_memory, $new_swap, $new_memory_high);= =0D > -- =0D > 2.39.2=0D =0D =0D =0D =0D =0D --===============0257470496060116701== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============0257470496060116701==--