don't (accidentally) modify PVE::Cluster::vmlist
when listing volumes, otherwise an empty hash can be persisted into the current worker's $vmlist, which could cause issues at various other API endpoints. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
c3ed9ac3da
commit
a420842d01
@ -958,8 +958,11 @@ sub list_volumes {
|
||||
|
||||
foreach my $item (@$data) {
|
||||
if ($type eq 'images' || $type eq 'rootdir') {
|
||||
|
||||
my $vmtype = $vmlist->{ids}->{$item->{vmid}}->{type};
|
||||
my $vminfo = $vmlist->{ids}->{$item->{vmid}};
|
||||
my $vmtype;
|
||||
if (defined($vminfo)) {
|
||||
$vmtype = $vminfo->{type};
|
||||
}
|
||||
if (defined($vmtype) && $vmtype eq 'lxc') {
|
||||
$item->{content} = 'rootdir';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user