Grafana 4.2.0 RPM missing /etc/grafana/grafana.ini?

Hello,
I recently downloaded the latest Grafana RPM from https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0-1.x86_64.rpm and upgraded (from grafana-4.0.2-1481203731.x86_64.rpm).

After upgrading, I can no longer restart Grafana. The log shows errors because /etc/grafana/grafana.ini is missing. Sure enough, /etc/grafana is now empty after the upgrade. In comparing the RPMs, the newer RPM no longer packages/install /etc/grafana/grafana.ini:
[timw@ticktest-dev RPMs]$ rpm -qlp grafana-4.0.2-1481203731.x86_64.rpm | grep grafana.ini
/etc/grafana/grafana.ini
[timw@ticktest-dev RPMs]$ rpm -qlp grafana-4.2.0-1.x86_64.rpm | grep grafana.ini
[timw@ticktest-dev RPMs]$

Is this expected or is there an issue with the packaging of the RPM?

Thanks,

Tim

The post install script installs the config file if missing, no other report on failed upgrades or first time installs. Strange. Try reinstalling, any errors output from install?

Thanks Torkel,
it happened on two systems. Both ldap.toml and grafana.ini disappeared. I copied them back from the /usr/share/grafana/conf versions so I’m up and running again.

Tim

What OS are you using?

Hi Torkel,
both VMs are running “CentOS Linux release 7.3.1611 (Core)”. Pretty up-to-date.

I have been manually downloading the RPMs and manually updating using e.g.
$ sudo yum localupdate grafana-4.2.0-1.x86_64.rpm
Also I jumped from 4.0.2 to 4.2.0-1 without ever installing 4.1.x.
I don’t know how many people do it this way as opposed to setting up the yum.repos.d and integrating with yum.

Tim

If you do:

rpm -Uvh grafana-4.2.0-1.x86_64.rpm

does that change anything?

Hi tenortim,

thanks for the info you posted.
I’ve been experiencing the exact same problem.
creating a backup of the complete /etc/grafana folder (i.e. the 2 ini files)and copying them back after the upgrade to 4.3.2 fixed my install.

I’m also using CentOS7.

Rob.

Yeah same thing just happened to me. Running the upgrade wiped the /etc/grafana folder. Really really terrible.

Your upgrade instructions say to backup the db in /var/lib/grafana/ which I did but makes no mention of backing up /etc/grafana. Please please fix this or at least put a huge bold warning saying to backup that folder because it will be wiped.

Very strange, we have never been able to replicate it, seems to happen in very unique situations, only 3 reported cases like this out of many many thousands upgrades.

Not a big deal @torkel thanks to snapshots and backups but still kind of annoying and could cause problems for those who don’t have that setup (tisk tisk…)

That being said it is pretty easy to recreate in a clean CentOS 7.3x64 VM

Full pastebin at pastebin[SLASH]ep4wv28L

Code to recreate:

cd /var/tmp
sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.1-1470047149.x86_64.rpm
/etc/init.d/grafana-server start

[root@localhost tmp]# ls -al /etc/grafana
total 28
drwxr-xr-x. 2 root root 40 Sep 11 17:07 .
drwxr-xr-x. 77 root root 8192 Sep 11 17:07 …
-rw-r-----. 1 root grafana 9136 Aug 1 2016 grafana.ini
-rw-r-----. 1 root grafana 3188 Aug 1 2016 ldap.toml

wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.0-beta1.x86_64.rpm
sudo yum -y localinstall grafana-4.5.0-beta1.x86_64.rpm

[root@localhost tmp]# ls -al /etc/grafana/
total 12
drwxr-xr-x. 2 root root 6 Sep 11 17:10 .
drwxr-xr-x. 77 root root 8192 Sep 11 17:10 …

Strange, you install them differently (3.1 and 4.5), it looks like a yum localinstall is not trigger rpm post install scripts, strange yum bug maybe.