client: don't make `osd_pool_default_pg_num` mandatory

making `osd_pool_default_pg_num` mandatory is a bit agressive and is
unrelated when you just want to create users keyrings.

Closes: #2241

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/2269/head
Guillaume Abrioux 2017-12-12 11:28:36 +01:00 committed by Sébastien Han
parent ab1dd3027a
commit a24fd1cfd9
4 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,7 @@ dummy:
# Generate a keyring using ceph-authtool CLI or python.
# Eg:
# $ ceph-authtool --gen-print-key
# or
# $ python2 -c "import os ; import struct ; import time; import base64 ; key = os.urandom(16) ; header = struct.pack('<hiih',1,int(time.time()),0,len(key)) ; print base64.b64encode(header + key)"
#keys:
# - { name: client.test, key: "ADD-KEYRING-HERE==", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=test", mode: "0600", acls: [] }

View File

@ -17,6 +17,7 @@ pools:
# Generate a keyring using ceph-authtool CLI or python.
# Eg:
# $ ceph-authtool --gen-print-key
# or
# $ python2 -c "import os ; import struct ; import time; import base64 ; key = os.urandom(16) ; header = struct.pack('<hiih',1,int(time.time()),0,len(key)) ; print base64.b64encode(header + key)"
keys:
- { name: client.test, key: "ADD-KEYRING-HERE==", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=test", mode: "0600", acls: [] }

View File

@ -51,6 +51,7 @@
changed_when: false
failed_when: false
when:
- ceph_conf_overrides.get('global', {}).get('osd_pool_default_pg_num', False) != False
- pools | length > 0
- copy_admin_key

View File

@ -6,4 +6,3 @@
include: create_users_keys.yml
when:
- user_config
- ceph_conf_overrides.get('global', {}).get('osd_pool_default_pg_num', False) != False