From 6aa43f9238a86f2c319c00b4e2f9c7dead659a61 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Wed, 23 Oct 2019 11:39:53 +0200 Subject: [PATCH] fix reverting for non-existing configs reverting a nonexisting option did not work with the latest changes in pve-guest-common, because we do not delete the pending option in 'add_to_pending_delete' anymore this had the effect that we had following in the config: [pending] option: pendingvalue delete: option which would do the deletion code and the pending add code (e.g. delete the pending cloud init drive and creating it again) to avoid that situation, we need to remove the option from the pending hash in the 'delete loop' Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 156ccab7..b2c0b0df 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1134,6 +1134,7 @@ my $update_vm_api = sub { next; } my $is_pending_val = defined($conf->{pending}->{$opt}); + delete $conf->{pending}->{$opt}; if ($opt =~ m/^unused/) { my $drive = PVE::QemuServer::parse_drive($opt, $val);