mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
tasks/rebuild_mondb.py: fill up the caps in the keyring
we will fail 'ceph-monstore-tool' command if the caps is empty so user won't assign a key without any caps when rebuilding the monstore. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
c5bd611d33
commit
a3bd4fc557
@ -141,6 +141,17 @@ def task(ctx, config):
|
||||
default_keyring = '/etc/ceph/{cluster}.keyring'.format(
|
||||
cluster=cluster_name)
|
||||
keyring_path = config.get('keyring_path', default_keyring)
|
||||
# fill up the caps in the keyring file
|
||||
mon.run(args=['sudo',
|
||||
'ceph-authtool', keyring_path,
|
||||
'-n', 'mon.',
|
||||
'--cap', 'mon', 'allow *'])
|
||||
mon.run(args=['sudo',
|
||||
'ceph-authtool', keyring_path,
|
||||
'-n', 'client.admin',
|
||||
'--cap', 'mon', 'allow *',
|
||||
'--cap', 'osd', 'allow *',
|
||||
'--cap', 'mds', 'allow *'])
|
||||
mon.run(args=['sudo', '-u', 'ceph',
|
||||
'ceph-monstore-tool', mon_store_dir,
|
||||
'rebuild', '--', '--keyring',
|
||||
|
Loading…
Reference in New Issue
Block a user