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 <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-10-23 11:39:53 +02:00 committed by Thomas Lamprecht
parent a034e3d624
commit 6aa43f9238

View File

@ -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);