Open
Description
Grafana 8.14.2 init-chown-data fails upon pod restart
After installing the chart, if grafana pod restarts it fails to come up. I suspect it is because the first start chowns the dir and then the subsequent restarts try to chown a dir that they do not own. root tries to change something owned by something else but since only "CHOWN" is provided to the container as the security context and all else is explicitly dropped, it fails to override.
How to reproduce
- Install the chart
helm upgrade -i my-release grafana/grafana --set initChownData.enabled=true --set persistence.enabled=true --wait
- Once the pod is running, delete it
- Observe that it cannot restart because the initcontainer fails with
19:52:08 dell-e7440 [--0] ~ $ k logs -c init-chown-data my-release-grafana-846948d9f4-vgxm7 chown: /var/lib/grafana/csv: Permission denied chown: /var/lib/grafana/png: Permission denied chown: /var/lib/grafana/pdf: Permission denied 19:52:16 dell-e7440 [--0] ~ $
Workaround
chmod 777
the contents of the PV[C] (I tried this with a hostpath PV mount)
or
Delete the drop: {ALL}
section from the init container's security context section.
Related issues/links
Metadata
Metadata
Assignees
Labels
No labels