Update the charm to use the latest changes in charms.ceph

Change-Id: I7aee1d27021e259367d6fe88002f996ab62a61c3
Closes-Bug: #1968369
This commit is contained in:
Luciano Lo Giudice 2022-04-12 22:05:33 -03:00
parent d72e8db254
commit 444f91f559
2 changed files with 7 additions and 2 deletions

View File

@ -291,7 +291,8 @@ def pool_permission_list_for_service(service):
for prefix in prefixes:
permissions.append("allow {} object_prefix {}".format(permission,
prefix))
return ['mon', 'allow r, allow command "osd blacklist"',
return ['mon', ('allow r, allow command "osd blacklist"'
', allow command "osd blocklist"'),
'osd', ', '.join(permissions)]

View File

@ -1134,7 +1134,8 @@ def get_mds_bootstrap_key():
_default_caps = collections.OrderedDict([
('mon', ['allow r',
'allow command "osd blacklist"']),
'allow command "osd blacklist"',
'allow command "osd blocklist"']),
('osd', ['allow rwx']),
])
@ -3453,6 +3454,9 @@ def enabled_manager_modules():
:rtype: List[str]
"""
cmd = ['ceph', 'mgr', 'module', 'ls']
quincy_or_later = cmp_pkgrevno('ceph-common', '17.1.0') >= 0
if quincy_or_later:
cmd.append('--format=json')
try:
modules = subprocess.check_output(cmd).decode('UTF-8')
except subprocess.CalledProcessError as e: