Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Stop creating /run/grafana on CentOS 7 #38

Merged
merged 2 commits into from
Mar 14, 2019

Conversation

Sharpie
Copy link
Member

@Sharpie Sharpie commented Mar 14, 2019

This commit updates the service management logic for grafana to drop the
creation of the /run/grafana directory prior to starting the service on
CentOS 7. Grafana 4.5.0 and later manage this by setting the RuntimeDirectory
in the grafana-server.service unit file. However, CentOS 7 uses systemd v219
which will fail during startup if the directory specified by RuntimeDirectory
already exists. This failure causes the first catalog application that installs
and starts grafana-server to fail --- which is particularly problematic for
Bolt plans that only run once.

Copy link
Contributor

@jarretlavallee jarretlavallee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We just need to clean up the spec tests that included those two resources.
https://github.com/puppetlabs/puppet_metrics_dashboard/blob/master/spec/classes/service_spec.rb#L22-L31

This commit updates the service management logic for grafana to drop the
creation of the /run/grafana directory prior to starting the service on
CentOS 7. Grafana 4.5.0 and later manage this by setting the RuntimeDirectory
option in the grafana-server.service unit file. However, CentOS 7 uses systemd
v219 which will fail during startup if the directory specified by
RuntimeDirectory already exists. This failure causes the first catalog
application that installs and starts grafana-server to fail --- which is
particularly problematic for Bolt plans that only run once.

Fixes puppetlabs#37.
@Sharpie
Copy link
Member Author

Sharpie commented Mar 14, 2019

Tests++

Updated PR with removal.

Prior to this commit, the spec tests for the ubuntu /run/grafana
resources were present but no longer valid. This commit removes these
tests and removes the rubocop exclusion that allowed them.
@jarretlavallee
Copy link
Contributor

My bad. It looks like more should have been removed than I put in. I pushed a commit with the other removals

@suckatrash suckatrash merged commit 8d60dd0 into puppetlabs:master Mar 14, 2019
@Sharpie Sharpie deleted the remove-rundir-creation branch March 14, 2019 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants