Skip to content

Commit

Permalink
mgr/cephadm/grafana: check if dashboard is enabled
Browse files Browse the repository at this point in the history
When deploying the grafana service but the mgr dashboard isn't enabled then
dashboard set-grafana-api-ssl-verify command fails.

Closes: https://tracker.ceph.com/issues/51796

Signed-off-by: Dimitri Savineau <[email protected]>
  • Loading branch information
dsavineau committed Jul 23, 2021
1 parent 9054b1a commit 16bb5b8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pybind/mgr/cephadm/services/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ def generate_config(self, daemon_spec: CephadmDaemonDeploySpec) -> Tuple[Dict[st
cert, pkey = create_self_signed_cert('Ceph', 'cephadm')
self.mgr.set_store('grafana_crt', cert)
self.mgr.set_store('grafana_key', pkey)
self.mgr.check_mon_command({
'prefix': 'dashboard set-grafana-api-ssl-verify',
'value': 'false',
})
if 'dashboard' in self.mgr.get('mgr_map')['modules']:
self.mgr.check_mon_command({
'prefix': 'dashboard set-grafana-api-ssl-verify',
'value': 'false',
})

grafana_ini = self.mgr.template.render(
'services/grafana/grafana.ini.j2', {
Expand Down

0 comments on commit 16bb5b8

Please sign in to comment.