When reloading the dashboard using `ceph mgr module disable/enable
dashbaord`, the error is thrown shortly after the dashboard module has
been reactivated, because `dashboard` is not yet available in
`services`. A second attempt works.
Fixes: https://tracker.ceph.com/issues/42684
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
(cherry picked from commit
808f0bf5e0adf4abda192758edbccdee3d4113d2)
return result
def _get_host(self):
- mgr_map = mgr.get('mgr_map')
- services = mgr_map['services']
- return services['dashboard']
+ # type: () -> str
+ services = mgr.get('mgr_map')['services']
+ return services['dashboard'] if 'dashboard' in services else ''
@Endpoint()
def __call__(self):