Resolve type change in Ceph Quincy for enabled_manager_modules

Change-Id: I4f81391e51312ec5795e3a3b840b2461e48cb3c4
This commit is contained in:
Chris MacNaughton 2022-04-01 13:00:06 +02:00 committed by Chris MacNaughton
parent c07fb2dc6a
commit b6bcec8072
1 changed files with 3 additions and 0 deletions

View File

@ -789,6 +789,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 = check_output(cmd).decode('utf-8')
except CalledProcessError as e: