mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-11 05:18:01 +03:00
lvmthin: Match snapshot remove regex to allowed names
We allow snapshot names that match pve-configid but during qm destroy we have not removed all snapshots that match pve-configid so far. For example, the name x-y was allowed but the resulting snap_vm-105-disk-0_x-y was not removed. Reported-by: Hannes Laimer <h.laimer@proxmox.com> Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
This commit is contained in:
parent
343ca2570c
commit
9b6ff01b79
@ -117,7 +117,7 @@ sub free_image {
|
||||
|
||||
# remove all volume snapshots first
|
||||
foreach my $lv (keys %$dat) {
|
||||
next if $lv !~ m/^snap_${volname}_(\w+)$/;
|
||||
next if $lv !~ m/^snap_${volname}_${PVE::JSONSchema::CONFIGID_RE}$/;
|
||||
my $cmd = ['/sbin/lvremove', '-f', "$vg/$lv"];
|
||||
run_command($cmd, errmsg => "lvremove snapshot '$vg/$lv' error");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user