`ceph_release` is not necessarily a valid key for `mgr_map['always_on_modules']`
This PR is inspired by https://github.com/ceph/ceph/pull/30421.
Signed-off-by: Volker Theile <vtheile@suse.com>
"""
result = []
mgr_map = mgr.get('mgr_map')
- always_on_modules = mgr_map['always_on_modules'][mgr.release_name]
+ always_on_modules = mgr_map['always_on_modules'].get(mgr.release_name, [])
for module_config in mgr_map['available_modules']:
module_name = module_config['name']
if module_name not in self.ignore_modules: