[pve-devel] [PATCH v3 qemu-server 3/7] cloudinit: make cloudnit options fastplug

Fabian Ebner f.ebner at proxmox.com
Thu Mar 31 15:01:22 CEST 2022


Am 09.06.21 um 13:54 schrieb Alexandre Derumier:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  PVE/QemuServer.pm | 30 +++---------------------------
>  1 file changed, 3 insertions(+), 27 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 6ddac72..0be4c45 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -4530,9 +4530,10 @@ sub vmconfig_hotplug_pending {
>  	$errors->{$opt} = "hotplug problem - $msg";
>      };
>  
> +    my @cloudinit_opts = keys %$confdesc_cloudinit;
>      my $changes = 0;
>      foreach my $opt (keys %{$conf->{pending}}) { # add/change
> -	if ($fast_plug_option->{$opt}) {
> +	if ($fast_plug_option->{$opt} || grep { $_ eq $opt } @cloudinit_opts) {

Maybe add them to the fast_plug_option hash directly? Then deleting a
cloudinit option would also be fastplugged (in the pending_delete_hash
handling below, it currently only checks for $fast_plug_option).

>  	    $conf->{$opt} = $conf->{pending}->{$opt};
>  	    delete $conf->{pending}->{$opt};
>  	    $changes = 1;





More information about the pve-devel mailing list