* [pve-devel] [PATCH qemu-server v2] qemu-server: pending config: fix hotplug check
@ 2025-10-14 14:58 Hannes Duerr
2025-10-14 16:22 ` Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Duerr @ 2025-10-14 14:58 UTC (permalink / raw)
To: pve-devel
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>
---
changes since v1:
removed unnecessary Data::Dumper dependency
src/PVE/QemuServer.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 45daa06c..f8ad9bbb 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -4714,9 +4714,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) {
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pve-devel] [PATCH qemu-server v2] qemu-server: pending config: fix hotplug check
2025-10-14 14:58 [pve-devel] [PATCH qemu-server v2] qemu-server: pending config: fix hotplug check Hannes Duerr
@ 2025-10-14 16:22 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-10-14 16:22 UTC (permalink / raw)
To: pve-devel, Hannes Duerr
On Tue, 14 Oct 2025 16:58:58 +0200, 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.
>
>
Applied but squashed in a change to avoid re-ordering of the lines needlessly
to keep the diff churn small for easier review and reworded/expanded the commit
message slightly, thanks!
[1/1] qemu-server: pending config: fix hotplug check
commit: df61f241c8457c30f3ae0d59d536d8a2879d7a28
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-14 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-14 14:58 [pve-devel] [PATCH qemu-server v2] qemu-server: pending config: fix hotplug check Hannes Duerr
2025-10-14 16:22 ` Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox