rbd: allow to use client custom ceph conf for each storeid
If you want to use different ceph storage, something they have differents values like ms_nocrc = true.(they are also others ones). The client need to specify theses special options to be able to connect This patch allow to create a ceph config file for each storeid in /etc/pve/priv/ceph/$storeid.conf Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
4dee23d305
commit
134172255f
@ -56,6 +56,12 @@ my $rbd_cmd = sub {
|
|||||||
push @$cmd, '--auth_supported', 'none';
|
push @$cmd, '--auth_supported', 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $cephconfig = "/etc/pve/priv/ceph/${storeid}.conf";
|
||||||
|
|
||||||
|
if(-e $cephconfig){
|
||||||
|
push @$cmd, '-c', $cephconfig;
|
||||||
|
}
|
||||||
|
|
||||||
push @$cmd, $op;
|
push @$cmd, $op;
|
||||||
|
|
||||||
push @$cmd, @options if scalar(@options);
|
push @$cmd, @options if scalar(@options);
|
||||||
@ -82,6 +88,12 @@ my $rados_cmd = sub {
|
|||||||
push @$cmd, '--auth_supported', 'none';
|
push @$cmd, '--auth_supported', 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $cephconfig = "/etc/pve/priv/ceph/${storeid}.conf";
|
||||||
|
|
||||||
|
if(-e $cephconfig){
|
||||||
|
push @$cmd, '-c', $cephconfig;
|
||||||
|
}
|
||||||
|
|
||||||
push @$cmd, $op;
|
push @$cmd, $op;
|
||||||
|
|
||||||
push @$cmd, @options if scalar(@options);
|
push @$cmd, @options if scalar(@options);
|
||||||
@ -314,6 +326,12 @@ sub path {
|
|||||||
$path .= ":auth_supported=none";
|
$path .= ":auth_supported=none";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $cephconfig = "/etc/pve/priv/ceph/${storeid}.conf";
|
||||||
|
|
||||||
|
if(-e $cephconfig){
|
||||||
|
$path .= ":conf=$cephconfig";
|
||||||
|
}
|
||||||
|
|
||||||
return ($path, $vmid, $vtype);
|
return ($path, $vmid, $vtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user