[pve-devel] applied: [PATCH manager 2/5] ceph: add application parameter to createpool

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Aug 10 10:13:04 CEST 2017


On Wed, Aug 09, 2017 at 11:42:53AM +0200, Dominik Csapak wrote:
> and use 'rbd' by default, since we cannot create a cephfs or
> rgw from the gui currently
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PVE/API2/Ceph.pm | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
> index 7cf07b70..c4d6ffcb 100644
> --- a/PVE/API2/Ceph.pm
> +++ b/PVE/API2/Ceph.pm
> @@ -1532,6 +1532,12 @@ __PACKAGE__->register_method ({
>  		type => 'string',
>  		optional => 1,
>  	    },
> +	    application => {
> +		description => "The application of the pool, 'rbd' by default.",
> +		type => 'string',
> +		enum => ['rbd', 'cephfs', 'rgw'],
> +		optional => 1,
> +	    }
>  	},
>      },
>      returns => { type => 'null' },
> @@ -1549,6 +1555,7 @@ __PACKAGE__->register_method ({
>  	my $size = $param->{size} || 3;
>  	my $min_size = $param->{min_size} || 2;
>  	my $rados = PVE::RADOS->new();
> +	my $application = $param->{application} // 'rbd';
>  
>  	$rados->mon_command({
>  	    prefix => "osd pool create",
> @@ -1583,6 +1590,12 @@ __PACKAGE__->register_method ({
>  	    });
>  	}
>  
> +	$rados->mon_command({
> +		prefix => "osd pool application enable",
> +		pool => $param->{name},
> +		app => $application,
> +	});
> +
>  	return undef;
>      }});
>  
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list