Merge pull request #15112 from jcsp/wip-19940

ceph-create-keys: update client.admin if it already exists

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-05-16 08:43:18 -05:00 committed by GitHub
commit 035c398487

View File

@ -136,6 +136,19 @@ def get_key(cluster, mon_id):
],
stdout=f,
)
else:
returncode = subprocess.call(
args=args_prefix + [
'auth',
'caps',
'client.admin',
'mon', 'allow *',
'osd', 'allow *',
'mds', 'allow *',
'mgr', 'allow *',
],
stdout=f,
)
if returncode != 0:
if returncode == errno.EPERM or returncode == errno.EACCES: