public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, Oguz Bektas <o.bektas@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list'
Date: Fri, 10 Jun 2022 09:36:42 +0200	[thread overview]
Message-ID: <7dbe49b0-3a35-c53f-6e56-e43ee2793e19@proxmox.com> (raw)
In-Reply-To: <20220328095330.512901-1-o.bektas@proxmox.com>

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');




      parent reply	other threads:[~2022-06-10  7:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28  9:53 Oguz Bektas
2022-06-08 10:22 ` Oguz Bektas
2022-06-10  7:36 ` Fabian Ebner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dbe49b0-3a35-c53f-6e56-e43ee2793e19@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=o.bektas@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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