On 30.06.20 15:56, Oguz Bektas wrote:
> do a simple check to see if our $opt is already in the delete section.
>

When can this even happen? If a delete is pending the real property is still
in the config?
 
> Signed-off-by: Oguz Bektas <o.bek...@proxmox.com>
> ---
>  src/PVE/LXC/Config.pm | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
> index 0a28380..237e2e5 100644
> --- a/src/PVE/LXC/Config.pm
> +++ b/src/PVE/LXC/Config.pm
> @@ -974,6 +974,9 @@ sub update_pct_config {
>       my $value = $param->{$opt};
>       if ($opt =~ m/^mp(\d+)$/ || $opt eq 'rootfs') {
>           $class->check_protection($conf, "can't update CT $vmid drive 
> '$opt'");
> +         if ($conf->{pending}->{delete} =~ m/$opt/) {

so adding 'mp1' matches a pending delete for unrelated 'mp10 ??

> +             die "${opt} is in pending delete queue. please select another 
> mountpoint ID\n";

Sentences start upper case after a full stop.

> +         }
>           my $mp = $class->parse_volume($opt, $value);
>           $check_content_type->($mp) if ($mp->{type} eq 'volume');
>       } elsif ($opt eq 'hookscript') {
> 


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to