[pve-devel] applied: [PATCH container] use the proper pending delete format while looping

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Oct 22 13:22:49 CEST 2019


On 10/22/19 12:40 PM, Oguz Bektas wrote:
> format of pending_delete_hash is changed in guest-common, so we have to
> use the new format while looping over the hash.
> 
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
>  src/PVE/LXC/Config.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
> index 916ecca..1bd3087 100644
> --- a/src/PVE/LXC/Config.pm
> +++ b/src/PVE/LXC/Config.pm
> @@ -1166,7 +1166,7 @@ sub vmconfig_hotplug_pending {
>  
>      my $pending_delete_hash = $class->parse_pending_delete($conf->{pending}->{delete});
>      # FIXME: $force deletion is not implemented for CTs
> -    while (my ($opt, undef) = each %$pending_delete_hash) {
> +    foreach my $opt (keys %$pending_delete_hash) {
>  	next if $selection && !$selection->{$opt};
>  	eval {
>  	    if ($LXC_FASTPLUG_OPTIONS->{$opt}) {
> @@ -1250,7 +1250,7 @@ sub vmconfig_apply_pending {
>  
>      my $pending_delete_hash = $class->parse_pending_delete($conf->{pending}->{delete});
>      # FIXME: $force deletion is not implemented for CTs
> -    while (my ($opt, undef) = each %$pending_delete_hash) {
> +    foreach my $opt (keys %$pending_delete_hash) {
>  	next if $selection && !$selection->{$opt};
>  	$class->cleanup_pending($conf);
>  	eval {
> 

applied




More information about the pve-devel mailing list