public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Michael Köppl" <m.koeppl@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>
Cc: "pve-devel" <pve-devel-bounces@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] qemu-server: pending config: fix hotplug check
Date: Tue, 14 Oct 2025 16:55:31 +0200	[thread overview]
Message-ID: <DDI4RJMLTJ3Z.WC9AIXE4XY8Q@proxmox.com> (raw)
In-Reply-To: <20251014144335.113639-1-h.duerr@proxmox.com>

On Tue Oct 14, 2025 at 4:43 PM CEST, Hannes Duerr wrote:
> When checking whether cpu and mem hotplug have already been set, it was
> not checked whether there is already a hotplug section in the VM config,
> which results in an uninitialized value error.
> At the same time, remove unnecessary regex.
>
> Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
> ---
>  src/PVE/QemuServer.pm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index 45daa06c..9b16d057 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -24,6 +24,7 @@ use Storable qw(dclone);
>  use Time::HiRes qw(gettimeofday usleep);
>  use URI::Escape;
>  use UUID;
> +use Data::Dumper;

Leftover from debugging ;)

>  
>  use PVE::Cluster qw(cfs_register_file cfs_read_file cfs_write_file);
>  use PVE::CGroup;
> @@ -4714,9 +4715,9 @@ sub vmconfig_hotplug_pending {
>          eval {
>              if ($opt eq 'hotplug') {
>                  die "skip\n"
> -                    if ($value =~ /memory/) || ($value !~ /memory/ && $conf->{hotplug} =~ /memory/);
> +                    if ($value =~ /cpu/) || ($conf->{hotplug} && $conf->{hotplug} =~ /cpu/);
>                  die "skip\n"
> -                    if ($value =~ /cpu/) || ($value !~ /cpu/ && $conf->{hotplug} =~ /cpu/);
> +                    if ($value =~ /memory/) || ($conf->{hotplug} && $conf->{hotplug} =~ /memory/);
>              } elsif ($opt eq 'tablet') {
>                  die "skip\n" if !$hotplug_features->{usb};
>                  if ($value == 1) {



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-10-14 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 14:43 Hannes Duerr
2025-10-14 14:55 ` Michael Köppl [this message]
2025-10-14 14:59   ` Hannes Duerr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DDI4RJMLTJ3Z.WC9AIXE4XY8Q@proxmox.com \
    --to=m.koeppl@proxmox.com \
    --cc=pve-devel-bounces@lists.proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal