[pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list'
Oguz Bektas
o.bektas at proxmox.com
Mon Mar 28 11:53:30 CEST 2022
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
PVE/CLI/pveam.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm
index 6c26f209..0ad33823 100644
--- a/PVE/CLI/pveam.pm
+++ b/PVE/CLI/pveam.pm
@@ -122,6 +122,8 @@ __PACKAGE__->register_method ({
my $cfg = PVE::Storage::config();
+ die "Storage does not exist!\n" if !defined($cfg->{ids}->{$storeid});
+
die "Storage does not support templates!\n" if !$cfg->{ids}->{$storeid}->{content}->{vztmpl};
my $vollist = PVE::Storage::volume_list($cfg, $storeid, undef, 'vztmpl');
--
2.30.2
More information about the pve-devel
mailing list