grafana pod: open the database the earlier container left
The pod's volume is the earlier container's data directory, and the NixOS grafana module keeps its database at `<dataDir>/data/grafana.db`. The pod set `paths.data` to the directory itself, so it opened a new, empty `grafana.db` beside the carried one, and the secret-key guard read that new file. Datasources with secrets, API tokens, hand-made dashboards, users and teams of a switched host were orphaned. `paths.data` and the guard's database path are now `<dataDir>/data`. The VM test's earlier Grafana keeps its database in the NixOS layout, and the test asserts the carried file is the only `grafana.db` in the volume. Closes #6979
This commit is contained in:
parent
42199dfa76
commit
fe6221138c
1 changed files with 41 additions and 8 deletions
|
|
@ -605,8 +605,10 @@ dials the pod's ClusterIP Service by name, as the stores' vhosts do, so
|
|||
- **State.** Grafana's data directory on the host is
|
||||
`/var/lib/nixos-containers/swarm-grafana/var/lib/grafana`: the claim
|
||||
`swarm-grafana-store` binds a static local volume on it, so the database the
|
||||
container kept is the pod's, with its dashboards, annotations and users. The
|
||||
node label is `hyperhive.darkest.space/state-grafana`
|
||||
container kept is the pod's, with its dashboards, annotations and users.
|
||||
Grafana's `paths.data` is the `data` directory in it, where the NixOS module
|
||||
keeps `grafana.db` (a `paths.data` of the volume itself opens a new, empty
|
||||
database beside the carried one). The node label is `hyperhive.darkest.space/state-grafana`
|
||||
([node labels](node.md#node-labels)), and the pod's `fsGroup` is `65532` with
|
||||
the `OnRootMismatch` policy, as for the stores.
|
||||
- **Who reaches what.** The namespace's `default-deny-ingress` and the pod's own
|
||||
|
|
|
|||
Loading…
Reference in a new issue