if auth is 'none' there is no client keyring, so do not generate it and
do not write it into the config

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 PVE/API2/Ceph.pm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 1ce74378..1036e24c 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -331,7 +331,9 @@ __PACKAGE__->register_method ({
                #'osd pool default pgp num' => $pg_num,
            }
 
-           $cfg->{client}->{keyring} = '/etc/pve/priv/$cluster.$name.keyring';
+           if ($auth eq 'cephx') {
+               $cfg->{client}->{keyring} = 
'/etc/pve/priv/$cluster.$name.keyring';
+           }
 
            if ($param->{pg_bits}) {
                $cfg->{global}->{'osd pg bits'} = $param->{pg_bits};
@@ -349,7 +351,9 @@ __PACKAGE__->register_method ({
 
            cfs_write_file('ceph.conf', $cfg);
 
-           PVE::Ceph::Tools::get_or_create_admin_keyring();
+           if ($auth eq 'cephx') {
+               PVE::Ceph::Tools::get_or_create_admin_keyring();
+           }
            PVE::Ceph::Tools::setup_pve_symlinks();
        });
 
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to