Skip to content

Commit 4e023a9

Browse files
committed
Add note on id of grafana_local_admin account
1 parent 7fc90f2 commit 4e023a9

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

doc/source/operations/secret-rotation.rst

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Full method
7474
the state of the cloud before any changes are made
7575

7676
2. Edit your Kolla-Ansible checkout to include changes not yet included
77-
upstream.
77+
upstream.
7878

7979
.. _kolla-change:
8080

@@ -98,7 +98,7 @@ Full method
9898
.. code:: bash
9999
100100
git fetch https://review.opendev.org/openstack/kolla-ansible refs/changes/78/903178/2 && git cherry-pick FETCH_HEAD
101-
101+
102102
3. Re-install Kolla-Ansible from source in your Kolla-Ansible Python
103103
environment
104104

@@ -129,7 +129,7 @@ Full method
129129
^redis_master_password
130130
^memcache_secret_key
131131
_ssh_key
132-
132+
133133
private_key
134134
public_key
135135
^$
@@ -234,6 +234,28 @@ Full method
234234
235235
grafana-cli admin reset-admin-password --password-from-stdin
236236
237+
.. note::
238+
239+
If you see an error ``Error: ✗ could not read user from database. Error: user not found``
240+
from Grafana CLI, it means that the ID of ``grafana_local_admin``
241+
is not 1 (The default value used with password reset command).
242+
You can find the ID of ``grafana_local_admin`` by accessing MariaDB.
243+
244+
.. code:: sql
245+
246+
# Enter MariaDB with
247+
docker exec -u 0 -it mariadb bash
248+
mysql grafana -p
249+
# Enter database password when prompted
250+
251+
SELECT id,login FROM user WHERE login = "grafana_local_admin";
252+
253+
Once you get the ID, run the password reset with user-id option
254+
255+
.. code:: bash
256+
257+
grafana-cli admin reset-admin-password --user-id <id> --password-from-stdin
258+
237259
12. Update the MariaDB database password
238260

239261
1. Generate a new secret:

0 commit comments

Comments
 (0)