Bad ownership/permissions of grafana.ini after related units reboot.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Grafana Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
for some time after its related apaches and influxdbs and such had rebooted, our grafana instance had a badly-owned config file:
Aug 21 07:55:55 juju-c7b322-
ubuntu@
-rw-r----- 1 root root 6664 May 23 12:16 /etc/grafana/
ubuntu@
This chgrp fixed things. There's something non-idempotent in the mechanisms used to write out this INI file if it can revert back to root:root ownership after a hook execution.
Changed in grafana-charm: | |
status: | New → Invalid |
It looks like this may have been the result of admin intervention, though I can find no trace of it beyond some history showing edits of the file in vim. It does look as though the layer renders the file 0644 rather than 0640, so I don't see that the charm is to blame. I likewise see nothing in the package's hooks to show that it touches the file, and it's not listed as a conffile in dpkg --status.
This seems to have been the result of user error dating back to late May, and not a bug in the charm.
./charm/ reactive/ grafana. py: render( source= GRAFANA_ INI_TMPL, reactive/ grafana. py: target=grafana_ini, reactive/ grafana. py- context=settings, reactive/ grafana. py- owner='root', group='root', reactive/ grafana. py- perms=0o644,
./charm/
./charm/
./charm/
./charm/
Package: grafana grafana- server 06959dae18c2a45 8543a93d99983f6 2e d/grafana- server 719be2ff0469898 c54537428ddd4a2 a4 systemd/ system/ grafana- server. service c7d5b7ac8550b1a 930a964020c02f9 a5 /grafana. com
Status: install ok installed
Priority: extra
Section: default
Installed-Size: 161921
Maintainer: <email address hidden>
Architecture: amd64
Version: 5.2.1
Depends: adduser, libfontconfig
Conffiles:
/etc/default/
/etc/init.
/usr/lib/
Description: Grafana
License: "Apache 2.0"
Vendor: Grafana
Homepage: https:/
dpkg-query: no path found matching pattern /etc/grafana/ grafana. ini