[pve-devel] applied: [PATCH storage] fix #1754: rbd: fix handling of external clusters

Thomas Lamprecht t.lamprecht at proxmox.com
Tue May 8 11:10:00 CEST 2018


Am 05/08/2018 um 09:28 AM schrieb Fabian Grünbichler:
> with the recent refactoring, external clusters were not handled
> correctly with librd if a pveceph or storage specific ceph config
> exists.
> 
> change the behaviour to include the pveceph config file only for pveceph
> managed clusters, and a storage specific one only for external ones.
> 
> set mon_host correctly using the values from storage.cfg for external
> librbd clusters.
> 

applied, thanks!

> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>   PVE/Storage/RBDPlugin.pm | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index f695548..15cbe67 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
> @@ -47,7 +47,7 @@ my $ceph_connect_option = sub {
>       my $keyring = "/etc/pve/priv/ceph/${storeid}.keyring";
>       my $pveceph_managed = !defined($scfg->{monhost});
>   
> -    $cmd_option->{ceph_conf} = $pveceph_config if (-e $pveceph_config);
> +    $cmd_option->{ceph_conf} = $pveceph_config if $pveceph_managed;
>   
>       if (-e $ceph_storeid_conf) {
>   	if ($pveceph_managed) {
> @@ -342,9 +342,8 @@ sub path {
>   
>       my $path = "rbd:$pool/$name";
>   
> -    if ($cmd_option->{ceph_conf}) {
> -	$path .= ":conf=$cmd_option->{ceph_conf}";
> -    } else {
> +    $path .= ":conf=$cmd_option->{ceph_conf}" if $cmd_option->{ceph_conf};
> +    if (defined($scfg->{monhost})) {
>   	my $monhost = $hostlist->($scfg->{monhost}, ';');
>   	$monhost =~ s/:/\\:/g;
>   	$path .= ":mon_host=$monhost";
> 





More information about the pve-devel mailing list