[pve-devel] applied-series: [PATCH manager 1/4] ceph: osd create: check for auth before getting bootstrap key

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jul 4 09:59:18 CEST 2019


On 7/3/19 3:53 PM, Dominik Csapak wrote:
> we do not need it if auth is 'none'
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PVE/API2/Ceph/OSD.pm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
> index 42dee361..064f6b03 100644
> --- a/PVE/API2/Ceph/OSD.pm
> +++ b/PVE/API2/Ceph/OSD.pm
> @@ -309,9 +309,10 @@ __PACKAGE__->register_method ({
>  	my $fsid = $monstat->{monmap}->{fsid};
>          $fsid = $1 if $fsid =~ m/^([0-9a-f\-]+)$/;
>  
> +	my $ceph_conf = cfs_read_file('ceph.conf');
>  	my $ceph_bootstrap_osd_keyring = PVE::Ceph::Tools::get_config('ceph_bootstrap_osd_keyring');
>  
> -	if (! -f $ceph_bootstrap_osd_keyring) {
> +	if (! -f $ceph_bootstrap_osd_keyring && $ceph_conf->{global}->{auth_client_required} eq 'cephx') {
>  	    my $bindata = $rados->mon_command({ prefix => 'auth get', entity => 'client.bootstrap-osd', format => 'plain' });
>  	    file_set_contents($ceph_bootstrap_osd_keyring, $bindata);
>  	};
> 

applied series, thanks!




More information about the pve-devel mailing list