[pve-devel] [PATCH container 7/7] update: handle pool limits
Wolfgang Bumiller
w.bumiller at proxmox.com
Thu Apr 11 12:03:28 CEST 2024
On Thu, Apr 11, 2024 at 09:23:53AM +0200, Fabian Grünbichler wrote:
> On April 10, 2024 3:13 pm, Fabian Grünbichler wrote:
> > Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> > ---
> > src/PVE/API2/LXC/Config.pm | 21 +++++++++++++++++++++
> > 1 file changed, 21 insertions(+)
> >
> > diff --git a/src/PVE/API2/LXC/Config.pm b/src/PVE/API2/LXC/Config.pm
> > index e6c0980..3fb3885 100644
> > --- a/src/PVE/API2/LXC/Config.pm
> > +++ b/src/PVE/API2/LXC/Config.pm
> > @@ -208,6 +208,27 @@ __PACKAGE__->register_method({
> >
> > my $running = PVE::LXC::check_running($vmid);
> >
> > + my $usage = PVE::LXC::Config->get_pool_usage($conf);
> > + if (defined($param->{memory}) || defined($param->{swap})) {
> > + my $old = $usage->{mem};
> > + my $new = $param->{memory} || $usage->{memory};
> > + $new *= ($param->{swap} || $usage->{swap});
>
> as Dominik pointed out off-list, this should be an addition, not a
> multiplication..
Do we even want to mix mem & swap? Feels cgroupv1-y... (as in bad)
More information about the pve-devel
mailing list