[pve-devel] [PATCH storage v3 02/20] rbd: implement check_config
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Sep 5 09:17:34 CEST 2017
On 08/31/2017 11:38 AM, Fabian Grünbichler wrote:
> to ensure the XOR-like connection between monhost and pveceph
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> new in v3, based on $check_monhost_pveceph from patch 4
>
> PVE/Storage/RBDPlugin.pm | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index 70d1fda..9251e59 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
> @@ -297,6 +297,18 @@ sub options {
> };
> }
>
> +sub check_config {
> + my ($class, $sectionId, $config, $create, $skipSchemaCheck) = @_;
> +
> + die "'monhost' and 'pveceph' options set on storage '$sectionId'\n"
> + if $config->{monhost} && $config->{pveceph};
you possibly forgot to adapt this error message to:
"mutual exclusive options 'monhost' and 'pveceph' both set on storage: $storeid"
(or similar) as mentioned in v2, it's an easy fix-up though, just reminding so we
do not forget this.
> +
> + die "one of 'monhost' or 'pveceph' must be set on storage '$sectionId'\n"
> + if !($config->{monhost} || $config->{pveceph});
> +
> + return $class->SUPER::check_config($sectionId, $config, $create, $skipSchemaCheck);
> +}
> +
> # Storage implementation
>
> sub parse_volname {
>
More information about the pve-devel
mailing list