do a simple check to see if our $opt is already in the delete section.

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/) {
+               die "${opt} is in pending delete queue. please select another 
mountpoint ID\n";
+           }
            my $mp = $class->parse_volume($opt, $value);
            $check_content_type->($mp) if ($mp->{type} eq 'volume');
        } elsif ($opt eq 'hookscript') {
-- 
2.20.1

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

Reply via email to