mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 17:01:46 +00:00
catch exception when storage does not exists
This commit is contained in:
parent
254575e971
commit
f0cab979e5
@ -1756,8 +1756,14 @@ sub disksize {
|
|||||||
if ($volid =~ m|^/|) {
|
if ($volid =~ m|^/|) {
|
||||||
$path = $timeoutid = $volid;
|
$path = $timeoutid = $volid;
|
||||||
} else {
|
} else {
|
||||||
|
eval {
|
||||||
$storeid = $timeoutid = PVE::Storage::parse_volume_id($volid);
|
$storeid = $timeoutid = PVE::Storage::parse_volume_id($volid);
|
||||||
$path = PVE::Storage::path($storecfg, $volid);
|
$path = PVE::Storage::path($storecfg, $volid);
|
||||||
|
};
|
||||||
|
if (my $err = $@) {
|
||||||
|
warn $err;
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $last_timeout = $storage_timeout_hash->{$timeoutid};
|
my $last_timeout = $storage_timeout_hash->{$timeoutid};
|
||||||
|
Loading…
Reference in New Issue
Block a user