mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-02 17:32:14 +00:00
ceph: osd: use get-or-create to create a bootstrap-osd key on demand
if for some reason the cluster does not have this key, generate it Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
7712a4e151
commit
217dde83f0
@ -313,7 +313,14 @@ __PACKAGE__->register_method ({
|
||||
my $ceph_bootstrap_osd_keyring = PVE::Ceph::Tools::get_config('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' });
|
||||
my $bindata = $rados->mon_command({
|
||||
prefix => 'auth get-or-create',
|
||||
entity => 'client.bootstrap-osd',
|
||||
caps => [
|
||||
'mon' => 'allow profile bootstrap-osd'
|
||||
],
|
||||
format => 'plain',
|
||||
});
|
||||
file_set_contents($ceph_bootstrap_osd_keyring, $bindata);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user