From: Christian Ebner <c.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH storage] plugin: handle invalid storage types
Date: Wed, 21 Jun 2023 15:43:21 +0200 (CEST) [thread overview]
Message-ID: <2078053640.624.1687355001676@webmail.proxmox.com> (raw)
In-Reply-To: <20230621132853.25144-1-c.ebner@proxmox.com>
Oops, I send the wrong patch file here, will send the correct one as v2.
Please ignore this one.
> On 21.06.2023 15:28 CEST Christian Ebner <c.ebner@proxmox.com> wrote:
>
>
> Warn and skip if a storage with unknown storage type is encountered.
> This might happen by manually editing the storage config.
>
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> src/PVE/Storage/Plugin.pm | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 9d3b1ae..7e7749d 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -520,6 +520,10 @@ sub parse_config {
> my $type = $d->{type};
>
> my $def = $defaultData->{plugindata}->{$type};
> + if (!$def) {
> + warn "invalid storage type for '$d'\n";
> + next;
> + }
>
> if ($def->{content}) {
> $d->{content} = $def->{content}->[1] if !$d->{content};
> --
> 2.39.2
prev parent reply other threads:[~2023-06-21 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 13:28 Christian Ebner
2023-06-21 13:43 ` Christian 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=2078053640.624.1687355001676@webmail.proxmox.com \
--to=c.ebner@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