public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list'
@ 2022-03-28  9:53 Oguz Bektas
  2022-06-08 10:22 ` Oguz Bektas
  2022-06-10  7:36 ` Fabian Ebner
  0 siblings, 2 replies; 3+ messages in thread
From: Oguz Bektas @ 2022-03-28  9:53 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Oguz Bektas <o.bektas@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list'
  2022-03-28  9:53 [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list' Oguz Bektas
@ 2022-06-08 10:22 ` Oguz Bektas
  2022-06-10  7:36 ` Fabian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Oguz Bektas @ 2022-06-08 10:22 UTC (permalink / raw)
  To: Proxmox VE development discussion

ping




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list'
  2022-03-28  9:53 [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list' Oguz Bektas
  2022-06-08 10:22 ` Oguz Bektas
@ 2022-06-10  7:36 ` Fabian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Fabian Ebner @ 2022-06-10  7:36 UTC (permalink / raw)
  To: pve-devel, Oguz Bektas

Am 28.03.22 um 11:53 schrieb Oguz Bektas:
> Signed-off-by: Oguz Bektas <o.bektas@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});

Using PVE::Storage::storage_check_enabled() would additionally catch
disabled storages and existing storages that are not available on the
current node.

> +
>  	die "Storage does not support templates!\n" if !$cfg->{ids}->{$storeid}->{content}->{vztmpl};
>  
>  	my $vollist = PVE::Storage::volume_list($cfg, $storeid, undef, 'vztmpl');




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-10  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28  9:53 [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list' Oguz Bektas
2022-06-08 10:22 ` Oguz Bektas
2022-06-10  7:36 ` Fabian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal