[pve-devel] [PATCH] Fix error handling if ram hot-plug fail.
Wolfgang Link
w.link at proxmox.com
Wed Apr 6 10:24:35 CEST 2016
There is no need to cancel the program if the ram can't remove.
The user will see that it is pending.
---
PVE/API2/Qemu.pm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 0d33f6c..96829c8 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -960,7 +960,14 @@ my $update_vm_api = sub {
if ($running) {
my $errors = {};
PVE::QemuServer::vmconfig_hotplug_pending($vmid, $conf, $storecfg, $modified, $errors);
- raise_param_exc($errors) if scalar(keys %$errors);
+ if (scalar(keys %$errors)) {
+ foreach my $k (keys %$errors) {
+ my $msg = $errors->{$k};
+ $msg =~ s/\n/ /;
+ print $msg;
+ syslog('warning', "$k: $msg");
+ }
+ }
} else {
PVE::QemuServer::vmconfig_apply_pending($vmid, $conf, $storecfg, $running);
}
--
2.1.4
More information about the pve-devel
mailing list