]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: set dashboard grafana-api-password when user provides one 47662/head
authorAdam King <adking@redhat.com>
Wed, 10 Aug 2022 19:58:44 +0000 (15:58 -0400)
committerAdam King <adking@redhat.com>
Wed, 17 Aug 2022 19:14:20 +0000 (15:14 -0400)
If a user provides this in the spec, cephadm will set up the inital admin
user with the given password, but the conig setting accessed with
"ceph dashboard get-grafana-api-password" is never updated. Cephadm
can handle updating it since it's the one setting the password.

Fixes: https://tracker.ceph.com/issues/57095
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit c7d84f93b11915b2668af225eedd33781bb9a07b)

Conflicts:
src/pybind/mgr/cephadm/services/ingress.py

src/pybind/mgr/cephadm/services/monitoring.py

index bebd246f07459562776381bb546da36cfe1f99b5..9c2a08b6d70e95def0cf6e78a8fb42d0212677ac 100644 (file)
@@ -68,6 +68,10 @@ class GrafanaService(CephadmService):
                 'http_addr': daemon_spec.ip if daemon_spec.ip else ''
             })
 
+        if 'dashboard' in self.mgr.get('mgr_map')['modules'] and spec.initial_admin_password:
+            self.mgr.check_mon_command(
+                {'prefix': 'dashboard set-grafana-api-password'}, inbuf=spec.initial_admin_password)
+
         config_file = {
             'files': {
                 "grafana.ini": grafana_ini,