* [pve-devel] [PATCH qemu-server] cloudinit: remove pending delete on online regenerate image
@ 2021-02-06 13:39 Alexandre Derumier
2021-02-06 13:45 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Derumier @ 2021-02-06 13:39 UTC (permalink / raw)
To: pve-devel
currently only pending changes are applied when we regenerate
image on a running vm, but not the pending delete.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
PVE/QemuServer.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 4d4efd9..f401baf 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4462,6 +4462,13 @@ sub vmconfig_hotplug_pending {
$conf->{$opt} = delete $conf->{pending}->{$opt};
}
+ my $pending_delete_hash = PVE::QemuConfig->parse_pending_delete($conf->{pending}->{delete});
+ foreach my $opt (sort keys %$pending_delete_hash) {
+ next if !grep { $_ eq $opt } @cloudinit_opts;
+ PVE::QemuConfig->remove_from_pending_delete($conf, $opt);
+ delete $conf->{$opt};
+ }
+
my $new_conf = { %$conf };
$new_conf->{$key} = $value;
PVE::QemuServer::Cloudinit::generate_cloudinitconfig($new_conf, $vmid);
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH qemu-server] cloudinit: remove pending delete on online regenerate image
2021-02-06 13:39 [pve-devel] [PATCH qemu-server] cloudinit: remove pending delete on online regenerate image Alexandre Derumier
@ 2021-02-06 13:45 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-02-06 13:45 UTC (permalink / raw)
To: Proxmox VE development discussion, Alexandre Derumier
On 06.02.21 14:39, Alexandre Derumier wrote:
> currently only pending changes are applied when we regenerate
> image on a running vm, but not the pending delete.
>
> Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
> ---
> PVE/QemuServer.pm | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-06 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-06 13:39 [pve-devel] [PATCH qemu-server] cloudinit: remove pending delete on online regenerate image Alexandre Derumier
2021-02-06 13:45 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox